首页 > 解决方案 > Vim 命令 0 转到第二列而不是第一列

问题描述

当我0在普通模式下按时,光标会转到第二列而不是第一列。这不是 vim 中所述的正常行为:help 0

我已经尝试禁用重映射以在我的配置(如下)的换行之间移动,并且行为是相同的。有什么办法可以改变这个吗?也许是一个包干扰了常规行为,但我看不出是哪个包。

这是我的 .vimrc 配置文件

set backspace=indent,eol,start " backspace over everything in insert mode
set nocompatible               " be improved, required
filetype off                   " required

" vim-plug manager
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')

Plug 'lervag/vimtex'
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal='abdmg'

Plug 'sirver/ultisnips'
let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<tab>'
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'

Plug 'itchyny/lightline.vim'

Plug 'sainnhe/gruvbox-material'

Plug 'scrooloose/nerdcommenter'

" List ends here. Plugins become visible to Vim after this call.
call plug#end()


syntax enable
"colorscheme monokai
set number
set ts=4
set expandtab
set autoindent
set wildmenu
set showmatch
set showmatch
set incsearch
set nohlsearch
set linebreak
set ttimeoutlen=0
set laststatus=2
set noshowmode
" Lets you edit another file without saving the current
set hidden

" GUI enhancements
" Set nice colors for 256 terminal
if !has('gui_running')
  set t_Co=256
endif
" Set the airline colorscheme
let g:lightline = {'colorscheme' : 'gruvbox_material'}
" Set colorscheme
set termguicolors
set background=dark
let g:gruvbox_material_background = 'medium'
colorscheme gruvbox-material

" REMAPS
" Inserting a real Tab when pressing Shift + Tab
:inoremap <S-Tab> <C-V>Tab>
" Move between wrapped lines
noremap <silent> k gk
noremap <silent> j gj
noremap <silent> 0 g0 
noremap <silent> $ g$

标签: vim

解决方案


推荐阅读