-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.vim
More file actions
269 lines (196 loc) · 5.74 KB
/
init.vim
File metadata and controls
269 lines (196 loc) · 5.74 KB
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
" {{{ Plugin manager
call plug#begin('~/.config/nvim/plugged')
"make vim look good
Plug 'altercation/vim-colors-solarized'
Plug 'vim-airline/vim-airline'
Plug 'tomasr/molokai'
" Nerdtree
Plug 'scrooloose/nerdtree'
" NERDTree Git flags
Plug 'Xuyuanp/nerdtree-git-plugin'
" Fast file search
Plug 'kien/ctrlp.vim'
" whitepase
Plug 'ntpeters/vim-better-whitespace'
" Easy motion
Plug 'easymotion/vim-easymotion'
" emmet plugin
Plug 'mattn/emmet-vim'
" git-gutter for nice git status in file
Plug 'airblade/vim-gitgutter', {'branch': 'nvim'}
" Quick search
Plug 'mileszs/ack.vim'
" Synstax check for many languages
Plug 'scrooloose/syntastic'
" Nice undo plugin
Plug 'vim-scripts/gundo'
" Fugitive git wrapper
Plug 'tpope/vim-fugitive'
" Easytags. tag library helper and required plugin vim-misc
" Plug 'xolox/vim-easytags'
Plug 'xolox/vim-misc'
" Dependend on xolox/vim-misc
Plug 'xolox/vim-notes'
" Tagbar
Plug 'majutsushi/tagbar'
" Better javascript syntax
Plug 'jelera/vim-javascript-syntax'
" better php syntax
Plug 'StanAngeloff/php.vim'
" Markdown syntax
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
" Project specific vim files
Plug 'joonty/vim-sauce'
" Dark powered neo-completion
function! DoRemote(arg)
UpdateRemotePlugins
endfunction
Plug 'Shougo/deoplete.nvim', { 'do': function('DoRemote') }
" tmux naviation
Plug 'christoomey/vim-tmux-navigator'
" Comments toggle plugin
Plug 'tomtom/tcomment_vim'
" Plugin for docker files
Plug 'ekalinin/Dockerfile.vim'
"Plugin for vim syntax
Plug 'nelsyeung/twig.vim'
"Plugin to diff 2 folders
Plug 'will133/vim-dirdiff'
"Better php completion
Plug 'shawncplus/phpcomplete.vim'
" Argument wrapping
Plug 'weierophinney/argumentrewrap'
" Snippets
Plug 'honza/vim-snippets'
" Snippets plugin
Plug 'sirver/ultisnips'
" Rest console
Plug 'diepm/vim-rest-console'
" Debugging
" Plug 'joonty/vdebug'
"Interesante kandidates
" glts/vim-cottidie
" tpope/vim-surround -- surround text with html, and more
" Valloric/YouCompleteMe -- Completion with fuzzy search
" godlygeek/tabular -- simple tab alligntment plugin
call plug#end()
" }}}
let mapleader = ","
set number " Turn on line numbers
" themes
syntax on " making shure syntax colors are shown
set background=dark " nice and dark
colorscheme solarized " nice theme
set t_Co=256
set laststatus=2 " alwasy show statusbar
let g:airline_detect_paste=1 " somthing with paste mode?
let g:airline#extenstions#tabline#enabled=1 " and show in tabs
nnoremap <silent> <leader>n :NERDTreeToggle<CR> " mapping to open nerdtree
let NERDTreeShowLineNumbers=1
" Open nerdtree and find file
nnoremap <f2> :NERDTreeFind<CR>
set autoindent " automatic indenting
set copyindent " must find this one out
set ruler " show ruler ? not shure where this shows
set expandtab " expand tabs to spaces
set shiftwidth=4 " expand 4 spaces
set shiftround " must look this one up
set tabstop=4 " also not know
set ignorecase " searching is initial case insensitive
set smartcase " is typing cases it becomse case sensitive
" 2 tabs in css/scss
autocmd Filetype scss setlocal ts=2 sts=2 sw=2
" Enable file type detection and do language-dependent indenting.
filetype plugin indent on
set hidden " enable the posiblility to switch buffer without saving. We have the memory
set scrolloff=3 " make shure there are always 3 lines vissible
set cursorline " nice highlightline on cursor
let g:sauce_path = "~/.config/nvim/sauces" " vim sauce storage path
set showcmd " show commands whiel typing
let g:deoplete#enable_at_startup = 1 " Use deoplete
" make lines that are to long red
" hi OverLength ctermbg=red ctermfg=white guibg=#592929
" match OverLength /\%81v.\+/
" Disabled because breaks syntax
" set synmaxcol=100 " this slows down vim extremely
"let g:easytags_async=1 " Easytags on asyn
"let g:easytags_file='~/.vimtags'
"{{{ Commit macro
autocmd FileType gitcommit :execute "normal! /On branch\<cr>yyggpxxk"
"}}}
"{{{ auto use include
" Yank word under cursor
" go to alternate buffer
" Yank namespace
" go back
" go to top
" find use
" past
" paste class
" sort
"
nnoremap <localleader>ns mBviw"ay<c-^>gg/namespace<cr>Y<c-^>gg/^use\s<cr>pcwuse<c-[>$i\<c-[>"ap{jV}k:sort<cr>`B:noh<cr>
"}}}
" {{{ Syntastic settings
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_scss_checkers=['sass']
" }}}
" {{{ My personal mappings
" Disable arrow keys!
nnoremap <Up> :echo "Use 'k' instead!"<CR>
nnoremap <Down> :echo "Use 'j' instead!"<CR>
nnoremap <Left> :echo "Use 'h' instead!"<CR>
nnoremap <Right> :echo "Use 'l' instead!"<CR>
nnoremap <leader>ve :e $MYVIMRC<CR> " VimrcEdit
nnoremap <leader>vs :source $MYVIMRC<CR> " VimrcSource
" }}}
" {{{ Ultisnippet settings
let g:UltiSnipsSnippetsDir='/home/niek/.config/nvim/plugged/vim-snippets/UltiSnips'
" }}}
" {{{ Vimnotes setings
let g:notes_directories = ['/media/niek/Storage/Dropbox/Dropbox/vimNotes/user']
" }}}
" {{{ Ctrl-p settings
let g:ctrlp_max_files=0
" }}}
"{{{ Deoplete options
"
"}}}
" {{{ Vimscript learning
" chapter 3
noremap <leader>_ ddkP
noremap <leader>- ddp
" chapter 4
inoremap <c-u> <esc>viwUea
" Chapter 5?
"
" Chapter 6
let maplocalleader="\\"
" Chapter 7 = vimrc srouce and load
" Chapter 8
iabbrev mischien "misschien"
iabbrev @@ @author Niek de Gooijer <[email protected]><c-]>
" Chapter 9
" quotes the current word
nnoremap <leader>' viw<esc>a'<esc>hbi'<esc>lel
vnoremap <leader>q <esc>`<i'<esc>`>a'<esc>
" Chapter 10
" insertmode exit
inoremap jk <esc>
" Chapter 13 & 14
" Autocommand
augroup filetype_php
autocmd!
autocmd FileType php :iabbrev <buffer> rthis return $this
augroup END
" }}}
" {{{ Gundo
let g:gundo_prefer_python3 = 1
" }}}