iso*_*les 3 vim keyboard-shortcuts
如果我zz
在 vim 中按下,我的屏幕/视图将垂直居中于光标位置。
我怎么能做同样的事情,但水平呢?有 vim 命令吗?
没有单一的 Vim 命令,但您可以结合zs
使用zH
: 滚动以将光标定位在屏幕左侧,然后向右滚动半个屏幕宽度。
我有这个映射在我的~/.vimrc
:
" Horizontally center cursor position.
" Does not move the cursor itself (except for 'sidescrolloff' at the window
" border).
nnoremap <silent> z. :<C-u>normal! zszH<CR>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
436 次 |
最近记录: |