Skip to content

Instantly share code, notes, and snippets.

@tyru
Forked from ujihisa/is-cmdwin.vim
Created June 7, 2011 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyru/1012620 to your computer and use it in GitHub Desktop.
Save tyru/1012620 to your computer and use it in GitHub Desktop.
function! s:is_cmdwin()
let save_ei = &eventignore
set eventignore=all
try
wincmd n
wincmd q
return 0
catch
return 1
finally
let &eventignore = save_ei
endtry
endfunction
" nnoremap \c :<C-u>echomsg <SID>is_cmdwin()<Cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment