Last active
December 25, 2015 13:49
-
-
Save sgur/6986646 to your computer and use it in GitHub Desktop.
Visual選択後のrでの変換での不具合を直す
This file contains hidden or 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
" (A) plugin/niceblock.vimにならって2行で書く | |
vnoremap <expr> <SID>(niceblock-r) niceblock#force_blockwise('r') | |
xmap r <SID>(niceblock-r) | |
" (B) 1行にまとめた書き方 | |
xnoremap <expr> r niceblock#force_blockwise('r') |
ありがとうございます。更新しました。
(B)の方でしか使ってないのバレバレですね。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(A)の書き方だと以下の2つの問題があります。
<Plug>(niceblock-r)
の定義を上書きしてしまう<Plug>
ではなく<SID>
を使うべきxmap <expr> r
の<expr>
は要らない