Created
July 6, 2011 15:11
-
-
Save sl4m/1067471 to your computer and use it in GitHub Desktop.
stealing janus' CommandTFlush call when FocusGained event is triggered
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autocmd FocusGained * call s:CmdTFlush() | |
function s:CmdTFlush(...) | |
if exists(":CommandTFlush") == 2 | |
CommandTFlush | |
endif | |
endfunction |
I noticed that as well when reading Janus' gvimrc file. I kept it when carrying it over to my gvimrc (and gist) and tested it out.
If you check out the gvimrc, you'll see other places where they use == 0
and == 1
When does BufWritePost occur?
Like if I created a new file via NerdTree, will it trigger BufWritePost?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Was wondering what the 2 means. The exists() documentation explains that it's an exact match with one command.