Browsing Posts in Editors

In addition to Vim, I use Emacs for things like org-mode and certain functional programming languages. Of course, I have configured it to behave closely like my Vim setup. The keybinding layout works fine using both Qwerty and Colemak (if you swap Y and J). Configuration highlights: Viper Tabbar Org-mode The files are available at […]

I like to be able to find the next occurence of a string without exiting the command line. Here is a hack to do that: set incsearch cnoremap <expr> / (getcmdtype() == ‘/’ || getcmdtype() == ‘?’ ? (getcmdline() == ” ? “<Up>” : “<Cr>/<Up>”) : “/”) cnoremap <expr> ? (getcmdtype() == ‘/’ || getcmdtype() […]

Here is my Vim configuration as of May 2009. It is a work in progress (and will always be), and is designed on a number of pragmatical choices and compromises, rather than on a universal guideline. That been said, I think my configuration has become pretty neat. See for yourself 🙂 I only use Vim […]

Update: New version available. It is ported to native Vim Script, and support has been added for wildcards in &path. Download. Add the file to your .vimrc, or fit it in as a plugin. On March 27, 2008: When you use the normal gf and <C-]> bindings, you change the buffer in the current window. […]

It is possible to customize the behavior of cindent in Vim by writing a wrapper function. All you need is to find out which indentifiers Vim uses for calculating the new indent, and then find an appropriate regular expression. Suppose we do not want to indent stuff in namespace declarations. I found out that it […]

I like to have a small window at the top of a tab page for reference. Useful when you want to consult the exact wording of a assignment or task description. This function creates a split with the top window showing the area of your visual mode selection. If more than one window is visible, […]

This is a simple, but important tip: Tabbed interfaces have emerged everywhere, and also Vim 7 comes with support for it. For projects consisting of multiple files, I find it easier to work with tabs than with split windows and multiple buffers. Of course we need some better keybindings: inoremap <M-n> <C-o>gt inoremap <M-p> <C-o>gT […]

Taking a course in Web Technology, I suddenly found myself editing a lot of XML files, so I hurried to fine-tune VIM to make editing more efficient. Please note that I am by no means an expert in XML, so please correct me, if I have misunderstood something. Configuration in xml.vim. Features: Tag closing with […]