indentation - Disable autoindent in vim -


i use vim since 20 years , told me usage of = key indenting block of code. try new vim key stop using because isn't doing want or don't need feature. in case find nice feature.

so downloaded vim script 1120 (php-correct-indenting) , installed it. .vimrc contains:

filetype indent on set smartindent 

now can use = indent visually marked code block.

but not want vim automatically indent code while typing. irritating me doing indentation myself , used ...

so how can stop vim automatically indenting code while typing can still continue use = indenting visually marked block of text.

ps: use hjkl moving around in vim. make 1.5 times faster :)

my complete vimrc:

syntax on  set tabstop=3 set shiftwidth=3  execute pathogen#infect()  filetype indent on set smartindent  

commenting last 2 lines stops autoindenting using "=" not use mentioned vim script anymore

the plugin sets 'indentexpr', controls both explicit reindenting via = indenting-as-you-type. fortunately, can control triggering of latter via 'indentkeys' option, clearing should work.

put following ~/.vim/after/indent/php.vim; way, it'll apply after plugin:

setlocal indentkeys= 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -