background preloader

Vim & vi

Facebook Twitter

Vimdoc - Vim documentations. Secrets of tabs in vim. Secrets of tabs in vim Thursday, 17 January 2008 I spend much of my day working on other people's code. People who have uncivilized ideas about how to indent their code. (Given some of the code I've seen, I sometimes think I should be simply pleased that they bothered to indent their code at all.) Until civilization aligns and we finally have elastic tabstops, I'll have to deal with different tab styles. The popular ones tend to be: Tabs are eight columns wide. I've seen some especially ... creative tab styles not listed above, including code indented with various innovative mixture of tabs and spaces. Tabstop Set tabstop to tell vim how many columns a tab counts for. Expandtab When expandtab is set, hitting Tab in insert mode will produce the appropriate number of spaces. shiftwidth Set shiftwidth to control how many columns text is indented with the reindent operations (<< and >>) and automatic C-style indentation. softtabstop Indentation in the real world Tabs are eight columns wide.

Vim. Vim scripts. Vim Tips Wiki. Vimcasts - free screencasts about the text editor Vim.

Eclipse + Vi(m)