-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
112 lines (98 loc) · 3.59 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
" Basics {
set nocompatible " explicitly get out of vi-compatible mode set autoindent " indent as above
set smartindent " guess where to indent
"set noexrc " don't use local version of .(g)vimrc, .exrc
"set background=dark " we plan to use a dark background
"set background=light " we plan to use a light background
set cpoptions=aABceFsmq
" |||||||||
" ||||||||+-- When joining lines, leave the cursor
" ||||||| between joined lines
" |||||||+-- When a new match is created (showmatch)
" |||||| pause for .5
" ||||||+-- Set buffer options when entering the
" ||||| buffer
" |||||+-- :write command updates current file name
" ||||+-- Automatically add <CR> to the last line
" ||| when using :@r
" |||+-- Searching continues at the end of the match
" || at the cursor position
" ||+-- A backslash has no special meaning in mappings
" |+-- :write updates alternative file name
" +-- :read updates alternative file name
syntax on " syntax highlighting on
nmap <right> :tabn<cr>
nmap <left> :tabp<cr>
" for test
"set relativenumber
" }
set nu
set backspace=indent,eol,start
set ruler " show the cursor position all the time
set laststatus=2 " Always show the statusline
set showcmd " display incomplete commands
set incsearch " do incremental searching
set scrolloff=7 "keep cursor stay in the middle 14 lines
set laststatus=2
set showmatch "match the parentheses
set tabstop=4
set shiftwidth=2
set softtabstop=4
set smarttab
set expandtab
set shiftround
"set nowrap "显示不换行
set ignorecase
set smartcase
set t_Co=256
set background=dark
colorscheme molokai
syntax on
set cursorline
set cursorcolumn
set colorcolumn=80
set tags=tags
set nocompatible " be iMproved, required
filetype off " required
" vim-plugin settings {
" Vundle seetings {
set nocompatible
filetype off
set runtimepath+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'flazz/vim-colorschemes'
Plugin 'tomasr/molokai'
Plugin 'Valloric/YouCompleteMe'
Plugin 'majutsushi/tagbar'
Plugin 'The-NERD-tree'
call vundle#end()
filetype plugin indent on
" }
" vim-airline settings {
let g:airline_theme="base16"
"}
" YouCompleteMe settings {
"let g:ycm_extra_conf_globlist = ['/mnt/raid0/ljj/*']
let g:ycm_server_python_interpreter='/usr/bin/python'
let g:ycm_global_ycm_extra_conf='/mnt/raid0/ljj/.ycm_extra_conf.py'
"nnoremap <F9> :YcmCompleter GoToDefinitionElseDeclaration<CR>
nnoremap <F8> :YcmDiags<CR>
nnoremap <F9> :YcmCompleter GoToDeclaration<CR>
nnoremap <F10> :YcmCompleter GoToDefinition<CR>
"let g:ycm_autoclose_preview_window_after_completion = 1
set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0
let g:ycm_enable_diagnostic_highlighting = 0
" }
" tagbar settings {
nmap <F7> :TagbarToggle<cr>
let g:tagbar_left = 1
let g:tagbar_sort = 0
" }
" NERDTree settings {
nmap <F3> :NERDTree<cr>
" }
"} end of vim-plugin settings