Sabtu, 07 November 2009

How to change Vim indentation

Indentation is important thing for programmer to write code. Vim is my favorite code editor and by default its indentation is four whitespaces characters. But I 'm prefer to use two whitespaces. So here are my steps to change vim's indentation on my Slackware Linux:

1. Create .vimrc file on your home directory.
2. write these on .vimrc:

set shiftwidth=2
set tabstop=2

3. save file.

1. shiftwidth: to control how many whitespace will be indented.
2. tabstop: to control how many whitespace a tab counts for.


Tidak ada komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...