forked from faktiva/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc.local
180 lines (125 loc) · 3.99 KB
/
vimrc.local
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
179
"
" vim configuration by Emiliano 'AlberT' Gabrielli <[email protected]>
" feel free to use
" Expecially intended for PHP and Symfony coding
"
set nocompatible
" enable pathogen plugin manager
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
syntax enable
" {{{ Color Schemes
call togglebg#map("<C-b><C-g>")
" {{{ Solarized
" https://github.com/altercation/vim-colors-solarized.git
"let g:solarized_termcolors=256
"set background=dark
"colorscheme solarized
" }}}
" {{{ Darcula
" https://github.com/blueshirts/darcula.git
"colorscheme darcula
" }}}
" {{{ Molokai
" https://github.com/tomasr/molokai.git
let g:rehash256 = 1
colorscheme molokai
" }}}
" }}}
" {{{ General
" jump to the last position when reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" load indentation rules and plugins according to the detected filetype.
if has("autocmd")
filetype plugin indent on
endif
" Highlight current line in insert mode.
if has("autocmd")
autocmd InsertLeave * se nocul
autocmd InsertEnter * se cul
endif
" Enable modeline
set modeline
set modelines=5
set ruler " show line and column information
set laststatus=2
set tabstop=4
set shiftwidth=4
set softtabstop=0
set expandtab
set ignorecase " caseinsensitive searches
set showmode " always show command or insert mode
set number
"set nonu nornu " Don't show line numbers by default
set foldmethod=marker " Enable folding by fold markers
set foldclose=all " Autoclose folds, when moving out of them
set incsearch " Use incremental searching
set hlsearch " Highlight search results
" vimdiff specific
if &diff
set diffopt+=iwhite
highlight! link DiffText Todo
endif
set fileformat=unix fileformats=unix,dos,mac
set encoding=utf-8 fileencoding=utf-8 fileencodings=utf-8
" Fix Mac backspace
if has("unix")
let s:uname = system("uname -s")
if s:uname == "Darwin\n"
set backspace=2
:fixdel
endif
endif
" }}}
" {{{ PLUGINS
" {{{ UltiSnips
" https://github.com/SirVer/ultisnips.git
let g:UltiSnipsEditSplit='vertical'
let g:UltiSnipsSnippetDirectories=['my-snippets', 'vim-snippets/UltiSnips']
let g:UltiSnipsListSnippets='<C-l>'
let g:UltiSnipsExpandTrigger='<C-c>'
let g:UltiSnipsJumpForwardTrigger='<C-j>'
let g:UltiSnipsJumpBackwardTrigger='<C-k>'
inoremap <expr> <C-j> ((pumvisible())?('<C-n>'):('<C-j>'))
inoremap <expr> <C-k> ((pumvisible())?('<C-p>'):('<C-k>'))
" }}}
" {{{ Pathogen
" https://github.com/tpope/vim-pathogen.git
set sessionoptions-=options
" }}}
" {{{ EditorConfig
" https://github.com/editorconfig/editorconfig-vim
let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
" }}}
" {{{ Indent Guides
" https://github.com/nathanaelkane/vim-indent-guides
map <Leader>ig :IndentGuidesToggle<CR>
let g:indent_guides_guide_size=1
let g:indent_guides_start_level=2
" }}}
" {{{ NERDTree
" https://github.com/scrooloose/nerdtree
"
imap <Leader>sp :NERDTreeToggle<CR>
map <C-n> :NERDTreeToggle<CR>
" }}}
" {{{ Syntastic
" https://github.com/scrooloose/syntastic
"
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_check_on_open = 1
let g:syntastic_check_on_wq = 0
" }}}
" {{{ Terraform
" https://github.com/hashivim/vim-terraform
"
let g:terraform_align=1
" }}}
" }}}