mac vim IDE插件安装
一、插件集
本次安装的插件集共有16种,这些插件足以调出IDE的界面。慢慢摸索吧!
Plugin 'VundleVim/Vundle.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-dispatch'
Plugin 'szw/vim-tags'
Plugin 'majutsushi/tagbar'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'Shougo/neocomplete.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'Raimondi/delimitMate'
Plugin 'ntpeters/vim-better-whitespace'
二、安装插件管理器
和在sublime text中安装插件前要安装package control插件管理器一样,要在vim中安装插件也要安装相应的插件管理器(当然不安装插件管理器也行,只是每次要安装插件时都要自己手动下载并配置,并且插件更新,删除也很麻烦,所以还是要借助插件管理器),本文中介绍的vim插件管理器为Vundle.vim。
Vundle.vim插件管理器工程托管在github上,链接为:
https://github.com/VundleVim/Vundle.vim
所以安装起来很方便,只要在终端下运行如下git命令即可:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
三、修改.vimrc文件
该文件配置示意如下,不可复制(有些内容被markdown编辑器转义),该文件可在本人资源页中下载。
” File: .vimrc
” Source: http://blog.jez.io/2015/03/03/vim-as-an-ide/
” Author: Jake Zimmerman jake@zimmerman.io
” Modifier: Yan Facai yarc18@gmail.com
”
” How I configure Vim :P
“
” Gotta be first
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
“” 插件管理
Plugin ‘VundleVim/Vundle.vim’
” —– Making Vim look good ——————————————
“” 色彩方案
Plugin ‘altercation/vim-colors-solarized’
“” 状态栏
Plugin ‘vim-airline/vim-airline’
Plugin ‘vim-airline/vim-airline-themes’
” —– Vim as a programmer’s text editor —————————–
“” 路径目录
Plugin ‘scrooloose/nerdtree’
“”” making NERDTree feel like a true panel, independent of tabs.
Plugin ‘jistr/vim-nerdtree-tabs’
“” 语法检查
Plugin ‘scrooloose/syntastic’
“” 异步编译
Plugin ‘tpope/vim-dispatch’
“” 标签
“”” 自动生成标签
Plugin ‘szw/vim-tags’
“”” 标签侧栏
Plugin ‘majutsushi/tagbar’
“” 模糊文件检索
Plugin ‘ctrlpvim/ctrlp.vim’
“” 自动补全
Plugin ‘Shougo/neocomplete.vim’
” —– Working with Git ———————————————-
“” 显示变动行
Plugin ‘airblade/vim-gitgutter’
“” 绑定git命令
Plugin ‘tpope/vim-fugitive’
” —– Other text editing features ———————————–
“” 配对符号补全
Plugin ‘Raimondi/delimitMate’
” Highlight and strip trailing whitespace
Plugin ‘ntpeters/vim-better-whitespace’
” Latex
“Plugin ‘VOoM’
call vundle#end()
filetype plugin indent on
syntax on
set textwidth=79 ” Maximum width of text that is being inserted. A longer
” line will be broken after white space to get this width.
“set formatoptions=tcqmM ” line break can follow an Asian Char and DO NOT insert space before
” or after an Asian Char
“vimdiff auto wrap long line
“autocmd FilterWritePre * if &diff | setlocal wrap< | endif
au VimEnter * if &diff | execute ‘windo set wrap linebreak nolist’ | endif
” — General settings —
set tabstop=4
set shiftwidth=4 ” numbers of spaces to (auto)indent
set softtabstop=4 ” backspace del 4 charac
set backspace=2 ” make backspace could del line breaks, indentation and so on
” make “tab” insert indents instead of tabs at the beginning of a line
set smarttab
” always uses spaces instead of tab characters
set expandtab
set scrolloff=3
set history=500
set showcmd
set ruler
set encoding=utf-8
set fileencodings=utf-8,gb2312,gbk,gb18030,iso-2022-jp,euc-jp,cp932,ucs-bom
set ffs=unix,dos
set hlsearch
set incsearch
set showmatch ” match when indicator is over them
set autoindent
set autoread
set number
set title ” change the terminal’s title
set visualbell ” don’t beep
set noerrorbells ” don’t beep
” Disable swap file
set nobackup
set noswapfile
“Custom key binding
” change the mapleader from \ to ,
let mapleader=”,”
” Toggle paste mode on and off
set pastetoggle=p
” Clear highlight text
nmap h :nohlsearch
” Reload vimrc
“nmap r :source ~/.vimrc
” move by rows, not linenumber
nnoremap j gj
nnoremap k gk
” Command + c, copy to system clipboard
vmap “+yi
” —– Plugin-Specific Settings ————————————–
” —– altercation/vim-colors-solarized settings —–
set t_Co=256 ” 256 color support
” use solarized color scheme
set background=dark
colorscheme solarized
” —– bling/vim-airline settings —–
” Always show statusbar
set laststatus=2
” Fancy arrow symbols, requires a patched font
” To install a patched font, run over to
” https://github.com/abertsch/Menlo-for-Powerline
” download all the .ttf files, double-click on them and click “Install”
” Finally, uncomment the next line
let g:airline_powerline_fonts = 0
” Show PASTE if in paste mode
let g:airline_detect_paste=1
” Show airline for tabs too
“let g:airline#extensions#tabline#enabled = 1
” —– jistr/vim-nerdtree-tabs —–
” Open/close NERDTree Tabs
map n NERDTreeTabsToggle
” NERDTree close on startup
let g:nerdtree_tabs_open_on_console_startup = 0
” —– scrooloose/syntastic settings —–
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_loc_list_height = 5
let g:syntastic_auto_loc_list = 1
“let g:syntastic_auto_jump = 3
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
” —– tpope/vim-dispatch settings —–
” Compiler
” —– szw/vim-tags settings —–
let g:vim_tags_use_vim_dispatch = 1
” —– majutsushi/tagbar settings —–
” Open/close tagbar with \b
nmap b :TagbarToggle
” Uncomment to open tagbar automatically whenever possible
“autocmd BufEnter * nested :call tagbar#autoopen(0)
” ctrlp settings
let g:ctrlp_map = ‘’
let g:ctrlp_cmd = ‘CtrlP’
let g:ctrlp_working_path_mode = ‘ra’
let g:ctrlp_root_markers = [‘pom.xml’, ‘.p4ignore’]
” eclim
let g:EclimCompletionMethod = ‘omnifunc’
” neocomplete setting
” Disable AutoComplPop.
let g:acp_enableAtStartup = 0
” Enable at startup
let g:neocomplete#enable_at_startup = 1
” Use smartcase.
let g:neocomplete#enable_smart_case = 1
” Minimum syntax keyword length
let g:neocomplete#sources#syntax#min_keyword_length = 3
let g:neocomplete#lock_buffer_name_pattern = ‘*ku*’
“” use eclim as backend
if !exists(‘g:neocomplete#sources#omni#input_patterns’)
let g:neocomplete#sources#omni#input_patterns = {}
endif
let g:neocomplete#sources#omni#input_patterns.java = ‘\k.\k*’
” 自动关闭预览
let g:neocomplete#enable_auto_close_preview = 1
” —– airblade/vim-gitgutter settings —–
” Required after having changed the colorscheme
“hi clear SignColumn
” In vim-airline, only display “hunks” if the diff is non-zero
let g:airline#extensions#hunks#non_zero_only = 1
” vim-fugitive
” —– Raimondi/delimitMate settings —–
let delimitMate_expand_cr = 1
augroup mydelimitMate
au!
au FileType markdown let b:delimitMate_nesting_quotes = [“"]
:’”
au FileType tex let b:delimitMate_quotes = ""
au FileType tex let b:delimitMate_matchpairs = "(:),[:],{:},
au FileType python let b:delimitMate_nesting_quotes = [‘”’, “’”]
augroup END
” VOoM
“nmap l :Voom latex
” vim-better-whitespace
” strip all trailing whitespace everytime you save the file for all file types.
“autocmd BufWritePre * StripWhitespace
四、安装前的最后准备:检查vim lua
本次安装的很多插件都需要lua的支持,检查vim是否支持lua有两种方式:
- 在vim命令模式下执行命令
echo has("lua")
,如果返回值为1则说明vim已经支持了lua。 - 在终端下执行如下命令:
vim --version | grep "lua"
如果返回如下结果则说明vim已经支持了lua:
+dialog_con +lua +rightleft +windows
Linking: clang -L. -L/usr/local/lib -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa -L/usr/local/lib -llua -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -framework Python -lruby.2.0.0 -lobjc
如果vim中没有支持lua,需要重新安装vim,运行如下命令即可:
brew update
brew install vim --with-lua
五、利用插件管理器安装插件
在终端下执行如下命令即可:
vim +PluginInstall +qall
mac vim IDE插件安装相关推荐
- vim常用插件安装及使用
vim常用插件安装及使用 vim常用插件安装 一. Vim8内置插件管理方案 二.vim插件推荐及安装 2.1 NERDTree插件安装及使用 2.1.1 下载NERDTree插件 2.1.2 NER ...
- mac下chrome插件安装位置
所有的chrome插件都是安装在资源管理库(library)里面的,如果你的记性够好,请记住MAC下插件的安装位置: ~/Library/Application Support/Google/Chro ...
- mac上chrome插件安装
mac上chrome浏览器默认隐藏了拖拽安装插件功能 chrome://flags/#extensions-on-chrome-urls只需打开该设置将Disabled改为Enabled,即可拖入.c ...
- mac版idea插件安装位置
/Users/xxxx/Library/ApplicationSupport/JetBrains/IntelliJIdea2020.3/plugins xxx 替换为自己的用户名
- 完美解决Mac系统下Chrome插件安装时程序包无效:CRX_HEADER_INVALID
Mac下Chrome插件安装方法--亲测有效 下载好插件crx文件后,不要直接拖拽到扩展页面进行添加 先把插件crx文件的后缀改成zip,再拖入到chrome浏览器的扩展应用中,这时就可以添加成功了 ...
- Mac下安装vim的插件YouCompleteMe及注意事项
mac下的YouCompleteMe安装还是很麻烦的,所以我安装完之后写下此篇blog,以供诸位一起学习 此篇借鉴了网上一些文章的情况下结合了我自己的一点心得: 1.基本准备(我默认已经安装好了以下软 ...
- mac vim 安装 YouCompleteMe 插件自动补全
前言 笔者常用vim进行c/c++/go开发,虽说vim也有自带自动补全(control+n,control+p),不过操作上还是比较麻烦,笔者希望可以实现,输入部分单词可以直接弹出下拉框提示所有可能 ...
- MAC下 Intellij IDEA GO语言插件安装及简单案例
MAC下 Intellij IDEA GO语言插件安装及简单案例 GoLang专有IDE GoLand : http://www.jetbrains.com/go/ 下载地址 Intellij IDE ...
- linux系统中VIM编辑器推荐安装插件
k-vim VERSION: 9.0 LAST_UPDATE_TIME: 2015-05-02 作者 wklken (凌岳/pythoner/vim党预备党员) Email: wklken@yeah. ...
最新文章
- Windows搭建以太坊的私有链环境
- 电话语音信箱在企业中的应用
- log4j的配置参数
- OpenGL ES之GLSL实现仿抖音“缩放”“灵魂出窍”“抖动”“闪白”“毛刺”“幻觉”等动态滤镜效果
- linux下挂接fat32分区
- 日志服务数据加工最佳实践: 从其他logstore拉取数据做富化
- scala java抽象理解_Scala之类、特质和抽象类
- 三星Galaxy Note 10再曝正面渲染图:居中前置摄像头更顺眼
- redis数据库的基础
- c语言程序填空题库,c语言填空题题库
- 微信公众号怎么做html,微信公众号怎么做页面模板?
- 教育的未来--我的感想
- 神秘AI变脸软件风靡全球,让你秒变身迪士尼在逃主角
- supermap gis
- opencl学习(四)
- Septentrio:mosaic系列内置全功能Ntrip
- Qt 实现带阴影 无边框的QMessageBox
- 朱威廉假收购真炒作的背后企图
- WOL网络唤醒在微星主板上开启 - ubuntu 20.04
- 微信小程序开发商城详细步骤