vim: deactivate foldmethod=syntax in insert mode

master
Guillaume DOTT 2013-03-20 17:38:19 +01:00
parent 496295af26
commit f28138ac14
1 changed files with 5 additions and 0 deletions

View File

@ -190,6 +190,11 @@ let php_htmlInStrings = 1
au Filetype css vertical resize 50
" Don't screw up folds when inserting text that might affect them, until
" leaving insert mode. Foldmethod is local to the window.
autocmd InsertEnter * let w:last_fdm=&foldmethod | setlocal foldmethod=manual
autocmd InsertLeave * let &l:foldmethod=w:last_fdm
" chmod +x on the file if it starts with a shebang
function! ModeChange()
if getline(1) =~ "^#!"