2009-09-18から1日間の記事一覧

Vimで、コマンドラインモードで、ユーザが入力中の値が取りたい

vim

cnoremap <c-a> <c-b>"<cr>:let @l=@:<cr>:call Increment(1)<cr>:<c-r>l function Increment(plus) let inputting = @l " 中略 " 中略 " 中略 let @l = "新しい入力値" call histdel(':', -1) endfunction とりあえず入力中のコマンドを実行させてしまって、 コマンドの履歴から、入力</c-r></cr></cr></cr></c-b></c-a>…