-
Notifications
You must be signed in to change notification settings - Fork 2
/
vimrc
142 lines (124 loc) · 5.44 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
" [Start] Setting from https://github.com/VundleVim/Vundle.vim
set nocompatible " be iMproved, required
set backspace=2 " compatible with version 5.4 and earlier
filetype off " required
:color desert " set color scheme as desert
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" personal setting for plugins
Plugin 'kien/ctrlp.vim' " ctrlp, easy file finder
Plugin 'scrooloose/nerdcommenter' " nerdcommenter, easy comment/decomment
"Plugin 'scrooloose/syntastic' " syntastic, syntax checking plugin
Plugin 'scrooloose/nerdtree' " nerdtree, explore filesystem for vim
Plugin 'jistr/vim-nerdtree-tabs' " nerdtree-tabs, NERDTree and tabs together in Vim, painlessly
"if v:version > 703 " youcompleteme requires Vim 7.3.598+
"Plugin 'Valloric/YouCompleteMe' " youcompleteme, fast, as-you-type, fuzzy-search code completion engine for Vim
"endif
"Plugin 'vim-scripts/taglist.vim' " taglist, source code browser plugin for Vim
"Plugin 'wesleyche/SrcExpl' " srcexpl, Source Explorer that provides context for the currently selected keyword
Plugin 'klen/python-mode' " python-mode
Plugin 'airblade/vim-gitgutter' " vim-gitgutter, shows a git diff
Plugin 'Xuyuanp/nerdtree-git-plugin' " nerdtree-git, git plugin for nerdtree
Plugin 'tpope/vim-fugitive' " vim-fugitive
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
syntax on
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" [End] Setting from https://github.com/VundleVim/Vundle.vim
" --- NERDTree Tabs Setting ----------------------------------------------------------------"
" NERDTree auto open
let g:nerdtree_tabs_open_on_gui_startup=1 " Open NERDTREE on gvim/macvim startup
let g:nerdtree_tabs_open_on_console_startup=1 " Open NERDTree on console vim startup
" ------------------------------------------------------------------------------------------"
" --- NERDTree Git Setting ----------------------------------------------------------------"
let g:NERDTreeIndicatorMapCustom = {
\ "Modified" : "~",
\ "Staged" : "+",
\ "Untracked" : "u",
\ "Renamed" : "r",
\ "Unmerged" : "!",
\ "Deleted" : "-",
\ "Dirty" : "*",
\ "Clean" : "",
\ "Unknown" : "?"
\ }
" ------------------------------------------------------------------------------------------"
" --- TagList Setting-----------------------------------------------------------------------"
"let Tlist_Use_Right_Window=1
"let Tlist_Auto_Open=1
"let Tlist_Enable_Fold_Column=0
"let Tlist_Compact_Format=0
"let Tlist_File_Fold_Auto_Close = 1
"nmap <LocalLeader>tt :Tlist<cr>
" ------------------------------------------------------------------------------------------"
" -----python-mode Setting----------------------------------------------------------------- "
set foldlevel=99
let g:pymode_options_colorcolumn = 0
let g:pymode_lint_ignore = "E501,E402"
let g:pymode_rope_goto_definition_bind = "<F1>"
" ------------------------------------------------------------------------------------------"
" -----git-fugitive Setting----------------------------------------------------------------- "
" other commands:
" - Gbrowse (open source in web)
" - Gsplit (git horizontal split)
" - Ggrep (git grep)
" - Glog (git log)
ca gb Gblame
ca ge Gedit
ca gm Gmove
ca grm Gremove
ca gvs Gvsplit
ca revert Gread
ca add Gwrite
" use - to add file at Gstatus!
ca st Gstatus
ca diff Gdiff
ca commit Gcommit
ca push Gpush
ca pull Gpull
" ------------------------------------------------------------------------------------------"
" --- Key Mapping Setting-------------------------------------------------------------------"
map <F2> :set nonumber!<CR>
map <F3> :set hlsearch!<CR>
map <F6> :NERDTreeTabsToggle<CR>
"map <F7> :TlistToggle<CR>
"map <F8> :SrcExplToggle<CR>
" ------------------------------------------------------------------------------------------"
set autoindent
set cindent " auto inden for C
set smartindent " set smart indent
set nobackup " do not create backup files
set ruler " show current cursor position
set number " show line number
set tabstop=2 " set tab as 2 spaces
set expandtab " use space instead of tab
set shiftwidth=2 " auto indent = 2 spaces
syntax enable " use syntax highlighter
set title " show title
set showmatch " show matched brackets
set hlsearch " highlighted searched results
set smartcase " sensitive case search
set clipboard=unnamed " setting for MAC " for iterm2, enable Use modern parser (experimental) in preference > profile > terminal
set mouse=a " enable vim automatic visual mode using mouse " press shift for disable (e.g. for copy & paste)
set wildmenu
set wildignore=*.bak,*.o,*.e,*~
set completeopt-=preview
" use :tn as shortcut of :tabnew
ca tn tabnew
command! W w " use :W as save