Vim-Plugin
本篇记录Vim
相关的一些插件用法及使用中的问题作为参考文档。
Basic
vim-plug
vim插件管理器
一个Vim插件管理器,利用异步并行可以快速地安装、更新和卸载插件。
-
安装
:PlugInstall
-
卸载
:PlugClean
-
升级
:PlugUpdate
-
列表
:PlugStatus
加速源:
VIM-Plug安装插件时,频繁更新失败,或报端口443被拒绝 - 知乎 (zhihu.com)
GitHub: Where the world builds software · GitHub (gitfast.tk)
nerdtree
树形文件管理器
-
呼出
:NERDTree
vim-visual-star-search
可视模式下通过
*
搜索nelstrom/vim-visual-star-search: Start a * or # search from a visual block (github.com)
tpope
Tim Pope
大神做的的几个vim
必备插件tpope/vim-surround: surround.vim: quoting/parenthesizing made simple
tpope/vim-commentary: commentary.vim: comment stuff out
tpope/vim-speeddating: speeddating.vim: use CTRL-A/CTRL-X to increment dates, times, and more
tpope/vim-repeat: repeat.vim: enable repeating supported plugin maps with “.”
vim-surround
自动环绕(围绕)
-
新增()-
ys
假设
inner word
添加[]
ysiw]
假设
line
添加’()’yss(
-
删除 -
ds
假设删除
()
ds{
-
改变 -
cs
-
可视模式 -
S
S(
vim-commentary
快速注释
-
注释行
gcc
-
注释对象
gc
+object
vim-speeddating
强化
<C-A>
和<C-X>
,支持时间加减
vim-repeat
使用’.'重复以上插件的动作
easymotion
快速移动光标
参考vim easymotion 瞬间移动大法[视频] - 知乎
Beautify
vim-airline
状态栏美化,且支持另外的多个插件
vim-airline/vim-airline: lean & mean status/tabline for vim that’s light as air
zoom
通过
+
和-
符号放大缩小Gvim
vim-scripts/zoom.vim: control gui font size with “+” or “-” keys.
Function
AutoComplPop
比较简单的一个自动补全插件
vim-scripts/AutoComplPop: Automatically opens popup menu for completions
load_template
载入模板插件
VisIncr
数字列操作
vim-scripts/VisIncr: Produce increasing/decreasing columns of numbers, dates, or daynames
ALE
代码检查插件
ALE
作为verilog
的代码检查工具时,外置Linter
返回的文本在Windows
系统下会存在问题(正则表达式不匹配),需要自行替换其正则表达式。详情可参考:
- dense-analysis/ale: Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support
- Fix ghdl and vcom linter regex patterns to support Windows paths (i.e. drive letter and colon C:) by azvanderpas · Pull Request #3346 · dense-analysis/ale
以我的为例(iverilog.vim):(可能出现的问题语句为C:\Users\Honk\AppData\Local\Temp\VIABCBF.tmp\PipelineMIPS.v:41: syntax error
,原pattern
无法匹配)
1 | "let l:pattern = '^[^:]\+:\(\d\+\): \(warning\|error\|syntax error\)\(: \(.\+\)\)\?' |
Draw
tablify
画表格
DrawIt
画ASCII图
vim-scripts/DrawIt: Ascii drawing plugin: lines, ellipses, arrows, fills, and more!
Mapping
快捷键mapping的各种配置方法