カーソルキーはVimのタブをスキップしません。

カーソルキーはVimのタブをスキップしません。

hカーソルキー(および)を使用してタブを横切ると、カーソルはlタブの上に移動せずに一度に1つずつ移動します。そこにタブやスペースがあるかどうかわからないので、これは迷惑です。私が期待しているのは、タブの上に移動するとカーソルがタブの先頭(最も左側の位置)にあるはずです。

この動作をどのように達成できますか?

使用していますので参考にしてくださいvisualedit=all

ベストアンサー1

(存在しない)virtualedit代わりに言われているようですが?visualedit

virtualeditこのオプションは可能なカーソル位置のタブ処理を定義するため、通常モードで無効にする必要があります。代わりにall、他のすべての値を一緒に使用してください。

:set virtualedit=insert,block,onemore

vimドキュメントから:help 'virtualedit'

'virtualedit' 've'  string  (default "")
    A comma separated list of these words:
        block   Allow virtual editing in Visual block mode.
        insert  Allow virtual editing in Insert mode.
        all     Allow virtual editing in all modes.
        onemore Allow the cursor to move just past the end of the line

    Virtual editing means that the cursor can be positioned where there is
    no actual character.  This can be halfway into a tab or beyond the end
    of the line.  Useful for selecting a rectangle in Visual mode and
    editing a table.


virtualedit=allこの説明ではジャンプタブ部分以外には不可能に見えます。

これを達成する1つの可能な方法は、キーを再マップhし、l通常モードでタブを明示的にスキップしますvirtualedit=all

おすすめ記事