OS/Linux

vi editor setting file

charom 2011. 7. 19. 03:50

The first thing to do here is check for the presence of a .exrc file in your home directory. You can do this by typing:

% cd
% ls .exrc

If the file is NOT present, you will get a message saying:

.exrc: No such file or directory. 

You would then need to create and modify the file with the appropriate commands. Type the following:

% echo 'set tabstop=4' > .exrc
% echo 'set shiftwidth=4' >> .exrc

If you have the file, make sure it contains the following line:

set tabstop=4