相关疑难解决方法(0)

将文本粘贴到vim时关闭自动缩进

我正在努力学习Vim.

当我从剪贴板将代码粘贴到我的文档中时,我会在每个新行的开头添加额外的空格:

line
  line
    line
Run Code Online (Sandbox Code Playgroud)

我知道你可以关闭自动缩进但我无法让它工作,因为我有一些其他设置冲突或某事(在我的.vimrc中看起来非常明显,但是当我把它们取出时似乎并不重要).

当我粘贴代码时如何关闭自动缩进但在编写代码时仍然有自动缩进?这是我的.vimrc档案:

set expandtab  
set tabstop=2  
set shiftwidth=2  
set autoindent  
set smartindent  
set bg=dark  
set nowrap  
Run Code Online (Sandbox Code Playgroud)

vim configuration editor indentation auto-indent

1119
推荐指数
16
解决办法
35万
查看次数

标签 统计

auto-indent ×1

configuration ×1

editor ×1

indentation ×1

vim ×1