diff options
| author | Teddy Wing | 2014-05-28 22:31:04 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2014-05-28 22:31:04 -0400 | 
| commit | 6029bc7f47787479669ce25e011f24303c1adc59 (patch) | |
| tree | 9828b67594e3b9aaaba5db93cfa5a7d05e472174 | |
| parent | c57c5f3414c70ec26fa1c2e28da4523ca19cebed (diff) | |
| download | dotvim-6029bc7f47787479669ce25e011f24303c1adc59.tar.bz2 | |
vimrc: figured out how to set b:did_ftplugin properly
I did need to set `b:did_ftplugin` in an autocmd. Without doing so I
was only setting it for the first opened buffer, and subsequent buffers
would have filetype plugins enabled. I'm surprised that I didn't realise
it until today. Figured out that I should be setting the autocmd on
BufReadPre in order to get the variable set properly for all buffers
that I open.
| -rw-r--r-- | vimrc | 7 | 
1 files changed, 6 insertions, 1 deletions
| @@ -217,7 +217,12 @@ set directory=~/.vim/backup/swap//  set undodir=~/.vim/backup/undo//  " Disable all default ftplugins -let b:did_ftplugin = 1 +"let b:did_ftplugin = 1 +augroup disable_all_default_ftplugins +	autocmd! +	" autocmd BufCreate *  call setbufvar(str2nr(expand("<abuf>")), "did_ftplugin", 1) +	autocmd BufReadPre * let b:did_ftplugin = 1 +augroup END  " Enable filetype-specific settings  filetype plugin on | 
