Vim/ビジュアルモードでのヤンク後にカーソルをスタート位置に戻さない

Vim/ビジュアルモードでのヤンク後にカーソルをスタート位置に戻さない

ビジュアルモードでの選択最終地点に移動

ということでヘルプを見ると

'>  `>                To the last line or character of the last selected
                      Visual area in the current buffer.  For block mode it
                      may also be the first character of the last line (to
                      be able to define the block).  Note that 'selection'
                      applies, the position may be just after the Visual
                      area.  {not in Vi}.

らしいのでこいつを使います。

キーに設定

ヤンクと同時に移動してしまいます

" ビジュアルモードでのヤンク後にカーソルを選択前の位置に戻さない
vnoremap y y`>

タグ

editor/vim/dont_back_cursor_start_position_after_visual_mode_yank.txt · 最終更新: 2017-09-27 10:48 by ore