aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2014-05-28 22:37:52 -0400
committerTeddy Wing2014-05-28 22:37:52 -0400
commita5c6c1b2a6b282b64b9b4b002d0fc9f42f9e59e1 (patch)
tree3a49285ade042f86f9a0a9d94a22a7004639870c /vimrc
parent6029bc7f47787479669ce25e011f24303c1adc59 (diff)
downloaddotvim-a5c6c1b2a6b282b64b9b4b002d0fc9f42f9e59e1.tar.bz2
vimrc: disable default ftplugins - clean up last commit
* Add entry in CHANGELOG * Delete commented trial lines * Add source URLs in a comment above the new augroup
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc10
1 files changed, 8 insertions, 2 deletions
diff --git a/vimrc b/vimrc
index a2b4aeb..2a79f05 100644
--- a/vimrc
+++ b/vimrc
@@ -163,6 +163,12 @@
" * Delete `Stab` command now that I moved it to its own plugin. Makes
" for better code organisation and a leaner vimrc.
"
+" 2014.05.28:
+" * Get disabling of default ftplugins working (finally). Turns out my
+" prior change to get them working only worked for the first opened
+" buffer (obviously in retrospect). Here, use BufReadPre to set the
+" buffer variable for all buffers that get opened.
+"
" Pathogen
@@ -217,10 +223,10 @@ set directory=~/.vim/backup/swap//
set undodir=~/.vim/backup/undo//
" Disable all default ftplugins
-"let b:did_ftplugin = 1
+" http://vim.wikia.com/wiki/File_type_plugins#Disabling_default_ftplugins
+" http://stackoverflow.com/questions/11337129/setting-buffer-specific-variables-in-vim#comment14956146_11351393
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