Make VIM Nice Looking

February 10th, 2009 Category: Linux

Linux users usually know the text editor called “vi”. For beginners it’s tough to use and the look and feel is not very nice. “vim” which means vi-improved brings many improvements. To make vim more nice looking I’ve put my settings for your .vimrc together. I personally like the following settings:

  • Syntax highlighting
  • Different color scheme
  • Disable indenting when copy and pasting a text from clip board
  • Replace tabs with blanks
  • Use 2 spaces as tabs instead of 4 spaces
  • Improve the search
  • Display cursor position

Open the .vimrc in your home directory and add the following settings:

" enable syntax highlightning
syntax enable
" set a different color scheme
colorscheme desert
" avoid identing when pasting a text
set paste
" enable auto indent
set autoindent
" expand tabs to spaces
set expandtab
" set the tab stop to 2 spaces and soft tab stop to 2 spaces
set tabstop=2 sts=2
set shiftwidth=2
" immediately search and display the typed search pattern
set incsearch
" highlighting of search matches
set hlsearch
" show cursor position
set ruler

Much better now! Try the search (e.g. ESC /high) and you will recognize that the search pattern will be immediately highlighted when you enter it.

Note: If you want to replace all tabs within an existing file you can now use the vi command “:retab” and all tabs will be removed according the settings done in your .vimrc.

And finally the result:

planlosorg-putty-10022009-192707.jpg

Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Webnews
  • MisterWong
  • Y!GG
  • Facebook
  • Furl
  • Google Bookmarks
  • Live-MSN
  • Readster
  • YahooMyWeb

No related posts.

This entry was posted on Tuesday, February 10th, 2009 and is filed under Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply