Closed hrsh7th closed 7 years ago
i
autocmd! TermOpen term://* call MyTermOpenSetting() function! MyTermOpenSetting() tnoremap <buffer><Esc> <C-\><C-n> nnoremap <buffer><expr>i MyMoveCursor() endfunction function! MyMoveCursor() let pos = getcurpos() return "i\<End>" . repeat("\<Left>", strlen(getline(pos[1])) - pos[2] + 1) endfunction
検討しておきます。
使ってみましたが完璧でした。ありがとうございます。
余談ですが、私の環境では <Home>, <End> がうまく動かず調整に苦労しました。
<Home>
<End>
概要
要望
i
などでインサートモードに入った場合にカーソル位置を復元する機能が欲しいです。