Skip navigation.

Blog

Skip the blog side panel.

My .vimrc file

Since I started using Vim 7 I created my configuration file. I upload it to any remote server where I have vim installed. Here it is for anyone who likes vim:

Download .vimrc.

Highlights of the file:

  • Enabled maximum memory usage for better performance when you have lots of RAM (1 GB here).
  • Enabled the use of ~/.viminfo which remembers data across restarts of vim (open buffers, marks, history and such).
  • Automatic complete.
  • Automatic Indentation.
  • Syntax highlighting.
  • Code folding enabled.
  • Line numbering enabled.
  • Automatic file backup, on save.
  • Custom status line and ruler.
  • For code indentation tabs are used instead of spaces. Tab width is set to 4 spaces.
  • Word wrapping is enabled, but no automatic formatting is done in the actual file. Just like in Notepad (and other simple editors) you see the document wrapped on screen.
  • Changed the keyboard mapping such that when you press " you get the second ". Same goes for when you open a parenthesis (, vim automatically closes the paranthesis with ).
  • Added two new functions: Fullscreen and Eretidy.
  • Fullscreen disables line numbers, code folding column and also disables the status line. You only get a view very similar to the view of more (or less). At the bottom of the screen, on the right side you have a small ruler which tells the buffer number, file type, line number, and column number. I use this function when I edit text documents - very nice to have a "simple" editor.
  • Eretidy is specifically tailored for me. This function just opens the ReTidy files. I use this quite often when cleaning documents.

For readability, I didn't use short notations in the file. For example, I use set autoindent instead of set ai.

I will update the file from time to time.

Send me a comment

Any comments are welcome! No field is required, except the message itself. If you want me to reply, include your email address.

Comments will not be displayed in this page! This form only sends your message to me.