mat*_*ttf 3 vim visual-studio-code
我一直试图从一个大文件中删除许多空行。在其他带有vim, 或vim本身的编辑器上,我可以这样做:
:%s/\n\n/\n/g
Run Code Online (Sandbox Code Playgroud)
但是,如果我使用\r或\t不起作用。vim编辑器上似乎缺少某些功能。是否有任何配置可以使这项工作或其他方式做到这一点?
要在 VScode 中使用高级 Vim 功能,您可以利用其 Neovim 集成。
首先,您必须安装 Neovim。有关说明,请查看:https : //github.com/neovim/neovim/wiki/Installing-Neovim
然后,在您的用户配置中调整以下设置:
// Use neovim on backend. (only works for Ex commands right now). You should restart VScode after enable/disabling this for the changes to take effect. NOTE: Neovim must be installed (v0.2.0) and neovimPath must be set the executable in order for this setting to work. Otherwise, vscodevim will crash.
"vim.enableNeovim": true,
// Path to run neovim executable. For example, /usr/bin/nvim, or C:\Program Files\Neovim\bin\nvim.exe
"vim.neovimPath": "nvim",
Run Code Online (Sandbox Code Playgroud)
重新启动 VScode。现在您可以使用 Vim Ex 命令,因为这些命令被发送到在后台运行的无头 Neovim 实例。您甚至可以在一定程度上使用已安装的 Vim 插件功能。
| 归档时间: |
|
| 查看次数: |
1319 次 |
| 最近记录: |