我喜欢的几款不错的vim插件
插件安装组件
https://github.com/tpope/vim-pathogen
supertab自动补齐
https://www.vim.org/scripts/script.php?script_id=1643
auto pairs自动匹配括号
https://www.vim.org/scripts/script.php?script_id=3599
syncstatics 语法错误检查
https://www.vim.org/scripts/script.php?script_id=2736
html Emmet快速编写神器
https://github.com/mattn/emmet-vim
Emmet 快速编写教程
https://www.cnblogs.com/wuhua1/p/6848960.html
插件安装方法,再安装了pathogen下,只需要进入.vim/bunlder目录下,git clone 插件就可以直接用了
最后附上个人vimrc配置文件
execute pathogen#infect() filetype plugin indent on set nonu set tabstop=4 "tab键长度 set softtabstop=4 "删除时长度 set shiftwidth=4 "自动tab长度 set expandtab "禁用tab 用空格代替 set cindent "C语言专用tab colorscheme darkblue "nnoremap i k "nnoremap k j "nnoremap j h "nnoremap h i "nnoremap H I nnoremap mm ) nnoremap mn ( nnoremap mh 0 nnoremap mk % nnoremap me $ inoremap <C-d> <del> nnoremap <C-c> <ESC>:w inoremap <C-b> <Left> inoremap <C-j> <Down> inoremap <C-k> <Up> inoremap <C-l> <Right> hi MatchParen ctermbg=blue ctermfg=white let g:user_emmet_leader_key='<C-Z>'
php实现自动缩进
mkdir ~/.vim/indent
vim ~/.vim/indent/php.vim #输入下面的内容保存即可shengxiao
if exists("b:did_indent") finish endif if exists('s:doing_indent_inits') finish endif let s:doing_indent_inits = 1 runtime! indent/html.vim unlet b:did_indent runtime! indent/php.vim unlet s:doing_indent_inits function! GetPhpHtmlIndent(lnum) if exists('*HtmlIndent') let html_ind = HtmlIndent() else let html_ind = HtmlIndentGet(a:lnum) endif let php_ind = GetPhpIndet() if php_ind >-1 return php_ind endif if html_ind > -1 if getline(a:num) =~ "^<?" && (0< searchpair('<?', '', '?>', 'nWb') \ || 0 < searchpair('<?', '', '?>', 'nW')) return -1 endif return html_ind endif return -1 endfunction setlocal indentexpr=GetPhpHtmlIndent(v:lnum) setlocal indentkeys+=<>>
程序员最高境界:静若瘫痪,动若癫痫
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!