Skip to content

Instantly share code, notes, and snippets.

@uplus
Created March 24, 2016 12:05
Show Gist options
  • Save uplus/f8548818b74f6751f37b to your computer and use it in GitHub Desktop.
Save uplus/f8548818b74f6751f37b to your computer and use it in GitHub Desktop.
vimのコマンドライン補完を自作する。 ref: http://qiita.com/uplus_e10/items/294524fc9dd5063b6a3b
command! -nargs=1 -complete=customlist,{func} {cmd} {rep}
function {func}(lead, line, pos)
return ['abc', 'efg']
endfunction
" コマンドを定義
command! -nargs=1 -complete=customlist,CompSamp Edit :edit <args>
" 補完関数を定義
function! CompSamp(lead, line, pos)
return ['~/.bashrc', '~/.zshrc', '~/vimrc']
endfunction
let g:vimconsole#auto_redraw = 1
:VimConsoleOpen # 出力用ウィンドを開く。
:VimConsoleLog 'message' # メッセージを出力する。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment