Archiv

Artikel Tagged ‘vim’

Hardkill VIMs Indentation

2. September 2008

Hi there,

I’m using the ftplugin to switch highlighting, indentation and some other filetype specific settings. Today I just wanted to get rid of the autoindentation feature for HTML files.

Simply putting the following lines in the html specific file didn’t work, because VIM reset the “indentexpr” variable back to default:

setlocal nocindent
setlocal noautoindent
setlocal nosmartindent
setlocal indentexpr=

So I googled around and found some other lines:

filetype indent off
filetype plugin indent off

After adding these also to the html-file it worked.

Bye
Sven

linux , ,

[VIM] Tip

21. April 2008

Hi there,

guess you have a python file, filled up with tabstops and now someone comes in and tells you, that tabstops are uncool and overall indenting should only use 4 spaces.

With vim no problem:

:set tabstop=4
:set expandtab
:retab

Done! Greetings to PhiBo ;-)

Bye
Sven

linux