Rational Girl

Attempting to be rational while dreaming of 3.141592653589793...

Setting up Vim

I recently found myself using VIM more and more. This, along with some OS and software upgrades had me revisit my .vimrc

There were some really nice examples on Sontak’s Humble Abode: vim as python ide

And, as I use ReST so often, I found this little keybinding useful, and added it to my .vimrc

" reST macro. Copy and paste a header, then select it
" and replace with the next character I type.
" For easily generating those section headers.

let @h = "yypVr"

A number of people have asked me if they should learn vim or emacs. IMHO, either can be useful, just as well as gedit , text wrangler, and many others. If you ae new to coding, it doesnt really matter, use something intuitive to you, with syntax highlighting for your coding language(s). Later, I find that you will want to install add-ons, for greater functionality like code folding , auto completion, and default templates for classes and funtions and other standard structures. Until then, an intuitive editor is the best.

Vim is useful, as the command keys can help you avoid using a mouse (RSI , and has the same key-mappings as unix man pages, and programs such as less.

Best advice:

Keep the configuration files (.vimrc, .emacsd ) for your editor in a repository somewhere accessible (bitbucket or github, or even in your dropbox.)

When you are on a new system, it makes it easy to grab your configuration and work in a familiar environment.