I prefer to use tab than white space (may be slightly different from most others)
But I found that when I hit Enter at the end of the line, it will add some white spaces , but not a tab . So I have to delete them and click the tab .
I want to know how to install vim as:
- use only tab for line indentation
- the tab looks like 4-spaces, but actually it is a tab
- when you hit
Enter at the end of a line, a new line starts only with tabs
I searched for this for a while, but did not find a good answer. Thank you in advance
UPDATE
@Alok's answer has proven itself in most cases. But I just found, sometimes it depends on the type of file. For example, if you are editing a haml file and there is vimfiles/indent/ in vimfiles/indent/ , then all tabs will be converted to space . Therefore, if you want it to be a tab , you should modify (or delete) the corresponding indent file.
vim indentation
Freewind Sep 10 '10 at 6:13 2010-09-10 06:13
source share