Customisation for Vim Editor

Linux, vi No Comments »

When doing some simple programming, I like to use the Vim editor instead of using a full-blown IDE. It’s a good editor but I want to use it more efficiently. Some of the things I customise for myself are:

  • auto indentation - this is a must for programmers
  • tab size - to indent I use the tab key but different applications represent the tab character with different number of spaces; I like mine to be 4
  • I like my colours to be different

These settings are saved in a file named .vimrc in each user’s home directory. Simply save the vi commands in this file to have your customisation. But remember to remove the semicolons. Below is my .vimrc contents to achieve my customisation.

set tabstop=4

set autoindent

colorscheme wombat

wombat is a colour scheme file which I saved in the directory /usr/share/vim/vim71/colors/.

P.S. While searching for some help on setting the file types in Vim, I found this page in wikibooks.org that describes the tips a programmer would use. It’s unbelievably useful. Do check it out if you use vi editor!

Another page with some useful tips is http://tips.webdesign10.com/general/vim

Changing Line Indentation in VI

Linux, vi No Comments »

Further to my previous post on changing the tab size in the VI editor, I’ve found out how to change the indentation size in VI.

Read the rest of this entry »

Changing the Tab Size in VI Editor

Linux, vi No Comments »

The vi editor is a powerful editor. Problem with it is that it is only for the command line which means that many preferences are not accessible via a ‘Preferences’ page. You need to know how to set preferences using commands.

Recently I’ve found out how to change the tab size in the vi editor. I think by default the tab size is 8 characters, which is too long for coding with proper indentation. To change it to a four character stop, use the following command in command mode:

:set tabstop=4
Read the rest of this entry »

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in