Hello world =) Let's start this blog with a short talk about vim. Even though Vim is one of the most powerful text editors ever, it is often underestimated by those who don't use it. The thing is that it takes times to get used to it. It is highly customizable, and scriptable. It even has a native Ruby support.

Some cool tips

  • I recently discovered the BufExplorer plugin. :BufExplorer show a list of buffers, allows to jump between buffers, to delete them etc.. like emac's C-x b so why not adding a key mapping like this ::nmap <C-x>b :BufExplorer <CR>
  • Substituting a string with another one in all opened buffer and save changes can be done with ":bufdo /string | :up". It can be generalized to any other operation. Very useful for core refactoring
  • The current buffer is represented by % in vim commands. For example, :ruby % will execute the current buffer as ruby code.
  • In visual mode, you can execute commands as well with ":!" and get the output of the command. It allows to evaluate code on the fly.

My vimrc is available through http://kereoz.org/.vimrc