每当我从另一个应用程序复制某些内容然后将其粘贴到 vim 中时,它都会弄乱缩进。
例如,刚才我尝试从 hello-world 教程中复制 manifest.json 文件以创建 chrome 扩展。
它看起来像这样:
{
"manifest_version": 2,
"name": "One-click Kittens",
"description": "This extension demonstrates a browser action with kittens.",
"version": "1.0",
"permissions": [
"https://secure.flickr.com/"
],
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
}
}
Run Code Online (Sandbox Code Playgroud)
但是,当我将它粘贴到 vim 中时,它看起来像这样:

我的vimrc如下:
"se t_Co=256
syntax enable
set nowrap
set mouse=a
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set number
set showcmd
set cursorline
set showmatch
execute pathogen#infect()
"filetype plugin indent on
"folding settings
set foldmethod=indent "fold based …Run Code Online (Sandbox Code Playgroud)