Skip to content

Commit

Permalink
vim: metarw: Fix to be properly reloadable
Browse files Browse the repository at this point in the history
plugin/metarw.vim was not properly reloadable, because it did not reset
autocommands defined by itself.  Fix this problem.
  • Loading branch information
kana committed Mar 28, 2010
1 parent 1424eb6 commit 1784569
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/metarw.txt
Expand Up @@ -269,6 +269,7 @@ BUGS *metarw-bugs*
CHANGELOG *metarw-changelog*

0.0.x 2008-08-10T12:19:52+09:00
- Fix plugin/metarw.vim to be properly reloadable.
- Fix requirements - metarw uses |fnameescape()| which is added since
Vim 7.1.299. (thanks to id:thinca)

Expand Down
15 changes: 9 additions & 6 deletions plugin/metarw.vim
Expand Up @@ -29,12 +29,15 @@ endif



autocmd BufReadCmd *:{*,*/*} call metarw#_event_handler('BufReadCmd')
autocmd BufWriteCmd *:{*,*/*} call metarw#_event_handler('BufWriteCmd')
autocmd FileAppendCmd *:{*,*/*} call metarw#_event_handler('FileAppendCmd')
autocmd FileReadCmd *:{*,*/*} call metarw#_event_handler('FileReadCmd')
autocmd FileWriteCmd *:{*,*/*} call metarw#_event_handler('FileWriteCmd')
autocmd SourceCmd *:{*,*/*} call metarw#_event_handler('SourceCmd')
augroup plugin-metarw
autocmd!
autocmd BufReadCmd *:{*,*/*} call metarw#_event_handler('BufReadCmd')
autocmd BufWriteCmd *:{*,*/*} call metarw#_event_handler('BufWriteCmd')
autocmd FileAppendCmd *:{*,*/*} call metarw#_event_handler('FileAppendCmd')
autocmd FileReadCmd *:{*,*/*} call metarw#_event_handler('FileReadCmd')
autocmd FileWriteCmd *:{*,*/*} call metarw#_event_handler('FileWriteCmd')
autocmd SourceCmd *:{*,*/*} call metarw#_event_handler('SourceCmd')
augroup END



Expand Down

0 comments on commit 1784569

Please sign in to comment.