【发布时间】:2020-03-11 10:24:59
【问题描述】:
在 Vim 中,当尝试一次跳转多行时(例如使用 G 或 gg),如果我跳过当前在屏幕上看到的内容,屏幕上的文本将无法正确绘制。
来自旧光标位置的文本填充了新位置周围的空白。
我尝试使用<Esc>:redraw<CR> 重绘缓冲区,但无济于事。
我的.vimrc 相当简单,我认为这不会导致问题。
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'arcticicestudio/nord-vim'
Plugin 'preservim/nerdtree'
call vundle#end()
filetype plugin on
colorscheme nord
set relativenumber number
syntax on
set bs=2
set smartindent autoindent
nmap <silent> <F8> :call ToggleDiff()<CR>
function ToggleDiff()
if(&diff)
windo diffoff
else
windo diffthis
endif
endfunction
我在 Konsole 上使用 tmux。
这里是.tmux.conf
unbind C-b
set-option -g prefix C-a
bind C-a send-prefix
set-window-option -g mode-keys vi
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
bind -n C-x select-pane -t :.+
bind-key -r -T prefix C-j resize-pane -D 5
bind-key -r -T prefix C-h resize-pane -L 5
bind-key -r -T prefix C-k resize-pane -U 5
bind-key -r -T prefix C-l resize-pane -R 5
# Design changes
set -g default-terminal "xterm-256color"
# Global options
set-option -g allow-rename off
# Nord options
set -g @nord_tmux_no_patched_font "1"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin "arcticicestudio/nord-tmux"
run -b '~/.tmux/plugins/tpm/tpm'
我也通过 etx 远程使用系统,虽然我已经使用了很长时间并且没有引起任何问题。
编辑:
刚刚观察到。当 NERDTree 在侧面打开时,不会出现此问题。这是有道理的,因为只有在我添加 NERDTree 插件时才会出现问题。
【问题讨论】: