我喜欢的几款不错的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= "tab键长度
set softtabstop= "删除时长度
set shiftwidth= "自动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
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 =
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 >-
return php_ind
endif
if html_ind > -
if getline(a:num) =~ "^<?" && (< searchpair('<?', '', '?>', 'nWb')
\ || < searchpair('<?', '', '?>', 'nW'))
return -
endif
return html_ind
endif
return -
endfunction
setlocal indentexpr=GetPhpHtmlIndent(v:lnum)
setlocal indentkeys+=<>>
我喜欢的几款不错的vim插件的更多相关文章
- 几款不错的VisualStudio2010插件
1.Gradient Selection 这个插件能使VisualStudio的高亮文本看起来是类似Blend的那样的效果,看起来更加舒服 2.LineAdornments 这个插件可以高亮光标所在的 ...
- 个人分享:平时开发中感觉几款不错 IDE 、插件、工具
本人主业 C# 开发,由于是做 Web 开发,所以像 SQL.JavaScript 这些肯定经常要接触到.当然,平时本人也写过 Node.js.Java.Python之类,不过,这些只能讲简单了解而已 ...
- 【jquery】一款不错的音频播放器——Amazing Audio Player
前段时间分享了一款视频播放器,点击这里.今天介绍一款不错的音频播放器——Amazing Audio Player. 介绍: Amazing Audio Player 是一个使用很方便的 Windows ...
- 推荐一款不错的dialog小工具:artDialog
推荐一款不错的dialog小工具, 地址:http://www.planeart.cn/demo/artDialog/_doc/labs.html 相关介绍例如以下: artDialog是一个基于ja ...
- .net下4款不错的微信SDK
.net下4款不错的微信SDK: 一款值得推荐的.Net微信开发SDK http://www.17ky.net/soft/474.html.Net微信公开帐号接口 WeiXinSDK http://w ...
- LINUX下一款不错的网站压力测试工具webbench
LINUX下一款不错的网站压力测试工具webbench 分类: Linux 2014-07-03 09:10 220人阅读 评论(0) 收藏 举报 [html] view plaincopy wget ...
- 【转载】跟我一起学习VIM - vim插件
目录 写在前面:Life Changing Editor 什么是VIM 为什么选VIM 为什么选其它 为什么犹豫选择它们 VIM >= SUM(现代编辑器) 如何学习VIM 一秒钟变记事本 VI ...
- Vim插件集合
插件Nerdtree实现浏览文件系统并打开文件或目录,在window中是非常不错的插件,但是在Ubuntu中这个插件就是一坑,特别提示,且无解.若在Ubuntu中使用目录浏览插件,建议使用其他插件,如 ...
- 跟我一起学习VIM - vim插件合集
2016-06-14 15:04 13333人阅读 评论(0) 收藏 举报 分类: Linux(104) 目录(?)[+] 前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教 ...
随机推荐
- lua分割字符串
str = "abc;123;345" local tab = string.split(str, ";") 然后list里面就是 abc123345 了.第二 ...
- 初学python之路-day05
每天一总结,今天学习的是数据类型及其使用方法与可变与不可变类型. 今天了解的数据类型有整型int,浮点型float,字符串类型str,布尔型bool,列表list. 整型int与浮点型float都属于 ...
- vue源码分析之new Vue过程
实例化构造函数 从这里可以看出new Vue实际上是使vue构造函数实例化,然后调用_init方法 _init方法,该方法在 src/core/instance/init.js 中定义 Vue.pro ...
- 怎么给PDF文件交换页面
在使用PDF文件的时候有文件页面的排版错误的时候,这个时候就需要交换页面了,那么怎么给PDF文件交换页面呢,在使用PDF文件的时候需要交换页面的时候要怎么做呢,下面小编就为大家分享一下PDF文件交换页 ...
- RC terms.
ETA: estimated time of arrival DEA: 1-Leg: 2-Leg: FCC: L10N: LocalizatioN i18N: InternationalizatioN ...
- asp.net core Csc任务不支持SharedCompilationId参数,请确认改参数存在于此任务中,并且是可设置的公共实例属性
创建Asp.net Core2.0版本项目时,成功创建后编译时出现如下问题 解决方法 Nuget上安装Microsoft.Net.Compilers
- web.xml中Servlet4.0版本的头信息格式
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmln ...
- vue-cli 构建的项目中 如何使用less
vue-cli 构建的项目默认是不支持 less 的,需要自己添加. 首选,安装 less 和 less-loader ,在项目目录下运行如下命令 npm install less less-load ...
- Windows上为Apache配置HTTPS
Windows上为Apache配置HTTPS 转 https://www.cnblogs.com/tianzijiaozi/p/7582671.html 1. 安装OpenSSL: Windo ...
- Python3面向对象—点和矩形类
Python类练习 定义一个类 class Point: '''二维坐标系中代表一个点''' pass print('打印Point:{}'.format(Point)) p1 = Point() p ...