我的vim配置

Posted jackie-astro

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了我的vim配置相关的知识,希望对你有一定的参考价值。

~/.vimrc内容如下:

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin ‘VundleVim/Vundle.vim‘
Plugin ‘tpope/vim-fugitive‘
Plugin ‘tpope/vim-unimpaired‘
Plugin ‘tpope/vim-repeat‘
Plugin ‘tpope/vim-speeddating‘
Plugin ‘tpope/vim-abolish‘
Plugin ‘scrooloose/nerdtree‘
Plugin ‘majutsushi/tagbar‘
Plugin ‘kien/ctrlp.vim‘
Plugin ‘powerline/powerline‘
Plugin ‘tpope/vim-commentary‘
Plugin ‘bling/vim-airline‘
Plugin ‘nathanaelkane/vim-indent-guides‘
Plugin ‘plasticboy/vim-markdown‘
Plugin ‘git://git.wincent.com/command-t.git‘
Plugin ‘Chiel92/vim-autoformat‘
Plugin ‘Raimondi/delimitMate‘
Plugin ‘honza/vim-snippets‘
Plugin ‘Yggdroot/indentLine‘
Plugin ‘frazrepo/vim-rainbow‘
Plugin ‘kana/vim-textobj-user‘
Plugin ‘kana/vim-textobj-lastpat‘
Plugin ‘nelstrom/vim-visual-star-search‘
Plugin ‘nelstrom/vim-qargs‘
call vundle#end()
filetype plugin indent on

set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set rnu
set nu
set hls
set dictionary=C:Usersjackiewords
"set incsearch

"set decimal system
set nrformats=
"set cursorline
"set lines=30 columns=120
set autoindent
set smartindent
set history=1000
set encoding=utf-8
"set mouse=c
set backspace=indent,eol,start
runtime macros/matchit.vim

set guifont=consolas:h10
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
set statusline=PATH: %r%F    LINE: %l/%L/%P TIME: %{strftime(‘%c‘)}

"nore means not recursive
"let mapleader="#"
nnoremap <silent> [b :bprevious<CR>
nnoremap <silent> ]b :bnext<CR>
nnoremap <silent> [B :bfirst<CR>
nnoremap <silent> ]B :blast<CR>
nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l>
"noremap <Up> <Nop>
"noremap <Down> <Nop>
"noremap <Left> <Nop>
"noremap <Right> <Nop>
"noremap <Leader>n nzz
map <F2> :echo strftime(‘%c‘)<CR>

cnoremap <expr> %% getcmdtype() == ‘:‘ ? expand(‘%:h‘).‘/‘ : ‘%%‘

let g:indentLine_char_list = [‘|‘, ‘|‘, ‘┆‘, ‘┊‘]
let g:indentLine_setColors = 1
let g:indentLine_showFirstIndentLevel = 1

syntax enable
"colorscheme dracula
"colorscheme monokai
set background=dark
"set background=light
colorscheme solarized
"
let g:rainbow_active = 1
let g:rainbow_guifgs = [‘DarkOrange3‘, ‘DarkOrchid3‘, ‘FireBrick‘]
let g:rainbow_ctermfgs = [‘lightblue‘, ‘lightgreen‘, ‘yellow‘, ‘red‘, ‘magenta‘]

let g:ycm_server_python_interpreter=‘/usr/bin/python‘
let g:ycm_global_ycm_extra_conf=‘~/.vim/.ycm_extra_conf.py‘

以上是关于我的vim配置的主要内容,如果未能解决你的问题,请参考以下文章

从零开始配置vim(27)——代码片段

vim代码片段插件ultisnips的使用

latex在vim中的代码片段

VIM 代码片段插件 ultisnips 使用教程

请品鉴我的vim配置

Sublime text3最全快捷键清单