Skip to content

Instantly share code, notes, and snippets.

@tyru
Created August 24, 2014 21:13
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/b2a0b85541cbb1d25d19 to your computer and use it in GitHub Desktop.
Save tyru/b2a0b85541cbb1d25d19 to your computer and use it in GitHub Desktop.
diff --git a/autoload/vital/__latest__/Vim/Buffer.vim b/autoload/vital/__latest__/Vim/Buffer.vim
index 1384298..9283b9a 100644
--- a/autoload/vital/__latest__/Vim/Buffer.vim
+++ b/autoload/vital/__latest__/Vim/Buffer.vim
@@ -10,9 +10,21 @@ function! s:_vital_depends()
return ['Prelude']
endfunction
-function! s:is_cmdwin()
- return bufname('%') ==# '[Command Line]'
-endfunction
+if exists('*getcmdwintype')
+ function! s:is_cmdwin()
+ return getcmdwintype() !=# ''
+ endfunction
+elseif v:lang ==# 'ja'
+ " TODO: Support more languages!
+ " https://github.com/vim-jp/vim/tree/master/src/po
+ function! s:is_cmdwin()
+ return bufname('%') ==# '[コマンドライン]'
+ endfunction
+else
+ function! s:is_cmdwin()
+ return bufname('%') ==# '[Command Line]'
+ endfunction
+endif
function! s:open(buffer, opener)
let save_wildignore = &wildignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment