In the next couple months, I'm planning on writing more about Javascript
as I pick it up in work and from my own reading. Towards the end of Hacker School, I decided I wanted to explore it as my second programming language. Reasoning: I can return to my functional programming roots and I can round out my understanding of web development by getting intimate with how the browser works.
However, this doesn't mean I will stop developing in Python
. Aside from Django exposure at work, I'm planning to continue building web applications for myself - and hopefully with more robust front-end UI.
But, that's not quite good enough. If there was one thing I took away from Hacker School, it was the idea that I should always be pushing myself to become a better programmer. Web development is fun and lets me exercise my creative side, but I want to step outside my comfort zone and pursue other avenues of technology too. I'm not entirely sure what direction I'll look but I think my best bet is to attach myself to an open source project and develop a deep understanding of that problem space.
Anyways, I'll think on that and come back with my decision within the next month. Hold me to it!
[future]
[javascript]
[python]
[django]
[open source]
[hacker school]
There comes a point, usually after you've been using something for awhile, when you realize you are no longer just using it casually. And no, I'm not talking about drugs.I'm talking about defining my first shortcut key in my .vimrc
.
A little background
I was first introduced to Vim by my Hacker School buddy James. For those of you who don't know, Vim is a very peculiar text editor. It is an "improved" version of Vi, the de facto Unix editor. Vim allows for a very efficient coding experience in which your hands generally never have to leave their main resting positions on the keyboard. And unlike editors (see Emacs), Vim makes heavy usage of different input modes to separate document navigation, inserting content, and text selection. This makes for a steep initial learning curve, as the default mode in Vim is mostly navigational, which is a farcry from the style of most word processors (hjkl actually mean hjkl, not left down up right).
Word Wrap
So I was excited to be able to write these blog posts using Vim since I've gotten quite good and fast at using it. However, I quickly realized that a text editor that primarily displays lines of code needs a bit of work to properly display words and sentences.
For instance, here's what I was seeing everytime I wrote a paragraph of text:
This is a medium paragraph of text. Everything is all fine and dandy until you
get to the end of the line. Then, whatever text you just wrote gets cut off p
recisely when you reach the column width of your Vim window. This leads to awk
ward and hard to read paragraphs!
So, after a bit of research, I threw this into my .vimrc
file.
" F5 word wrap mode (great for writing blog posts!)
set wrap
nnoremap <F5> :set linebreak<CR>
nnoremap <C-F5> :set nolinebreak<CR>
The first line turns the wrap
option on. The second line binds :set linebreak<CR>
to F5
in normal mode. The last line binds the reverse to Ctrl
+ F5
. <CR>
is a carriage return, otherwise known as the enter
or return
button.
So hitting F5
in normal mode effectively types out :set linebreak
then hits enter
for you, rendering much more readable text for when you are not just writing code!
This is a medium paragraph of text. Everything is all fine and dandy until
you get to the end of the line. Then, whatever text you just wrote gets cut
off precisely when you reach the column width of your Vim window. This
leads to awkward and hard to read paragraphs!
For those of you that are curious, Vim will automatically break the line as soon as it encounters any of these characters ^I !@*-+;:,./?
. You can change that default by redefining the breakat
option. See here for details.
[vim]
[vimrc]
[shortcut]
[emacs]
[word wrap]
[blog]
[hacker school]
Page 1 / 1