Vim 映射“;jj";至<;电子稳定控制系统>;使光标尝试向前跳转

Vim 映射“;jj";至<;电子稳定控制系统>;使光标尝试向前跳转,vim,windows-7,Vim,Windows 7,迁移到windows后,我已开始调试我的.vimrc文件(请参阅相关问题)。在Ubuntu中,我将jj组合键映射到ESC如下 inoremap jj <Esc> 命令中有尾随空格。(实际上很多映射都有它) 删除它 尾部的空白将添加到命令中,并将光标向前移动,移动量等于空格数 对整个文件执行此操作的一个简单方法是运行 :%s/\s\+$// 像这样的评论有什么意义: "Turn on syntax (I guess) syntax on

迁移到windows后,我已开始调试我的
.vimrc
文件(请参阅相关问题)。在Ubuntu中,我将
jj
组合键映射到
ESC
如下

inoremap jj <Esc>                       

命令中有尾随空格。(实际上很多映射都有它)

删除它

尾部的空白将添加到命令中,并将光标向前移动,移动量等于空格数

对整个文件执行此操作的一个简单方法是运行

:%s/\s\+$//

像这样的评论有什么意义:

"Turn on syntax (I guess)
syntax on
"Keep undo history when switching buffers
set hidden
"Not too sure what this does
set smarttab
"These two lines display the file name at the bottom
set modeline                        
set ls=2
或者这个:

"Turn on syntax (I guess)
syntax on
"Keep undo history when switching buffers
set hidden
"Not too sure what this does
set smarttab
"These two lines display the file name at the bottom
set modeline                        
set ls=2
或者这个:

"Turn on syntax (I guess)
syntax on
"Keep undo history when switching buffers
set hidden
"Not too sure what this does
set smarttab
"These two lines display the file name at the bottom
set modeline                        
set ls=2
或者这个:

"Turn on syntax (I guess)
syntax on
"Keep undo history when switching buffers
set hidden
"Not too sure what this does
set smarttab
"These two lines display the file name at the bottom
set modeline                        
set ls=2
(特别是考虑到您以后再次启用状态行)

还有


  • 多亏了
    set t_Co=256
    你将永远看不到桃花
  • set t_Co=256
    与您的
    vimrc
    无关。改为设置终端仿真器

  • 您的自定义状态行覆盖
    “标尺”
    。从配置中删除
    设置标尺


    一点也不“聪明”。从配置中删除它


    这是错误的,也是无用的。从配置中删除它


    • 上的语法
      意味着
      上的文件类型
    • 上的文件类型插件
      意味着
      上的文件类型
    • 您已经在上执行了
      语法,因此无需执行
      语法启用
    改用这个:

    filetype plugin indent on
    syntax on
    

    应该是:

    nnoremap K :bn<CR>
    
    nnoremap J :bp<CR>
    

    没有用,可以安全地移走。

    真是一团糟。此外,我并不生气,因为这非常有帮助