-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
178 lines (143 loc) · 5.3 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
" vim: ts=2 sw=2 :
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=$HOME/.vim/dein/repos/github.com/Shougo/dein.vim
" Required:
if dein#load_state('$HOME/.vim/dein')
call dein#begin('$HOME/.vim/dein')
" Let dein manage dein
" Required:
call dein#add('$HOME/.vim/dein/repos/github.com/Shougo/dein.vim')
" Add or remove your plugins here like this:
"call dein#add('Shougo/neosnippet.vim')
"call dein#add('Shougo/neosnippet-snippets')
call dein#add('jamessan/vim-gnupg')
call dein#add('tpope/vim-fugitive')
call dein#add('tpope/vim-sensible')
call dein#add('tpope/vim-endwise')
call dein#add('scrooloose/syntastic')
call dein#add('bling/vim-airline')
call dein#add('scrooloose/nerdtree')
call dein#add('tpope/vim-surround')
call dein#add('altercation/vim-colors-solarized')
call dein#add('chase/vim-ansible-yaml')
call dein#add('Valloric/YouCompleteMe', {'build': 'python install.py'})
call dein#add('rking/ag.vim')
call dein#add('Yggdroot/indentLine')
" Required:
call dein#end()
call dein#save_state()
endif
" Required:
filetype plugin indent on
syntax enable
" If you want to install not installed plugins on startup.
"if dein#check_install()
" call dein#install()
"endif
"End dein Scripts-------------------------
syntax enable " Turn on syntax highlighting.
filetype plugin indent on " Turn on file type detection.
"execute pathogen#infect()
if executable('ag')
let g:ackprg = 'ag --column'
endif
runtime macros/matchit.vim " Load the matchit plugin.
"set cursorcolumn " show vertical column on cursor
set showcmd " Display incomplete commands.
set showmode " Display the mode you're in.
set backspace=indent,eol,start " Intuitive backspacing.
set hidden " Handle multiple buffers better.
set wildmenu " Enhanced command line completion.
set wildmode=list:longest " Complete files like a shell.
set ignorecase " Case-insensitive searching.
set smartcase " But case-sensitive if expression contains a capital letter.
set number " Show line numbers.
set ruler " Show cursor position.
set incsearch " Highlight matches as you type.
set hlsearch " Highlight matches.
set wrap " Turn on line wrapping.
set scrolloff=2 " Show 3 lines of context around the cursor.
set title " Set the terminal's title
set confirm
"if has('mouse')
" set mouse=a " Enable mouse in terminal
"endif
if &term=~'xterm'
set t_Co=256
let g:solarized_termcolors=256
endif
set background=dark
colorscheme solarized
set visualbell " No beeping.
set nobackup " Don't make a backup before overwriting a file.
set nowritebackup " And again.
set directory=$HOME/.vim/tmp//,. " Keep swap files in one location
" UNCOMMENT TO USE
set tabstop=4 " Global tab width.
set shiftwidth=4 " And again, related.
set expandtab " Use spaces instead of tabs
set laststatus=2 " Show the status line all the time
" Useful status information at bottom of screen
" set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{exists('*CapsLockStatusline')?CapsLockStatusline():''}%=%-16(\ %l,%c-%v\ %)%P
" ^^ obsoleted by airline plugin
" Or use vividchalk
" colorscheme murphy
" Tab mappings.
map <leader>tt :tabnew<lf>
map <leader>te :tabedit
map <leader>tc :tabclose<lf>
map <leader>to :tabonly<lf>
map <leader>tn :tabnext<lf>
map <leader>tp :tabprevious<lf>
map <leader>tf :tabfirst<lf>
map <leader>tl :tablast<lf>
map <leader>tm :tabmove
" visualize trailing spaces
set listchars=tab:▸\ ,trail:·
set list
" Uncomment to use Jamis Buck's file opening plugin
"map <Leader>t :FuzzyFinderTextMate<Enter>
" Controversial...swap colon and semicolon for easier commands
"nnoremap ; :
"nnoremap : ;
"vnoremap ; :
"vnoremap : ;
" Automatic fold settings for specific files. Uncomment to use.
" autocmd FileType ruby setlocal foldmethod=syntax
" autocmd FileType css setlocal foldmethod=indent shiftwidth=2 tabstop=2
inoremap <C-U> <C-G>u<C-U>
function! Preserve(command)
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
execute a:command
" Clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
command! StripTrailingSpaces call Preserve("%s/\\s\\+$//e")
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.space = "\ua0"
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
let g:neobundle#types#git#enable_submodule = 1
let g:neobundle#install_process_timeout = 1500
let g:GPGExecutable = 'gpg2'