Wrap 模式,如果一个段落有多行,当它到达顶部的窗口时,然后我按 Ctrl+E,这个段落将完全消失。有没有办法让它只减少顶行而不是整个段落?
由于画面变化太突然,我经常找不到位置。
为了在包装中进行伪线处理,您可以更改:
noremap j gj
noremap k gk
并添加
set scrolloff = 3 " so you always have 3 lines on bottom and top or
set scrolloff = 999 " to have the cursor(line) always in the middle
为了找到这个位置,把它放在你的.vimrc
set cursorline
if &term =~ "xterm\\|rxvt"
" use a green cursor in insert mode
let &t_SI = "\<Esc>]12;green\x7"
" use an orange cursor otherwise
let &t_EI = "\<Esc>]12;orange\x7"
silent !echo -ne "\033]12;orange\007"
" reset cursor when vim exits
autocmd VimLeave * silent !echo -ne "\033]12;white\007"
" use \003]12;gray\007 for gnome-terminal
endif
它使光标在插入模式下变为绿色,否则变为橙色 - 这些\<esc>]12;green\x7
只是告诉终端它应该这样做 - 用 australopithici 或其他语言,因为那是终端的旧版本;-)。
这在你的.gvimrc
highlight Cursor guifg=black guibg=DarkOrange
highlight iCursor guifg=black guibg=Green
set guicursor=n-v-c:block-Cursor
set guicursor+=i:ver100-iCursor
set guicursor+=n-v-c:blinkon0
set guicursor+=i:blinkwait0
好吧,最后三行不是必需的,但我不喜欢眨眼
这个问题经常被问到,答案总是“你不能”。
可以通过“虚拟行”在一个换行中移动光标“虚拟行” gj
,gk
但它并不能真正帮助解决滚动问题:Vim 不能只显示x
换行的“虚拟行”。