在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插件时才会弹出该问题。
如果将default-terminal
设置为tmux-256color
或screen-256color
并重新启动tmux(tmux kill-server
),这仍然会发生吗?确保[tmux中的TERM
是tmux-256color
或screen-256color
。
您的Konsole也几岁?这可能是Konsole中的indn
错误。在.tmux.conf
中尝试此操作,然后重新启动tmux:
set -as terminal-overrides ',*:indn@'