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