Révision | dd28a75132044bfc8e763c73a03565719aeb630e (tree) |
---|---|
l'heure | 2018-01-24 00:30:08 |
Auteur | Markus <markus.prepens@gmai...> |
Commiter | Markus |
Update from workstation
committer: GitHub <noreply@github.com>
@@ -52,7 +52,9 @@ set backspace=eol,start,indent | ||
52 | 52 | |
53 | 53 | " Search: Some configuration for the search behavior. |
54 | 54 | set incsearch |
55 | -set inccommand=split | |
55 | +if has('nvim') | |
56 | + set inccommand=split | |
57 | +endif | |
56 | 58 | set magic |
57 | 59 | set gdefault |
58 | 60 | set hlsearch |
@@ -94,8 +96,8 @@ set pumheight=10 | ||
94 | 96 | |
95 | 97 | " Command line completion |
96 | 98 | set nowildmenu wildmode=list:full |
97 | -set wildignore=*.*~ | |
98 | 99 | set wildignorecase |
100 | +set wildignore=*.*~ | |
99 | 101 | |
100 | 102 | set showtabline=1 |
101 | 103 | set sessionoptions=buffers,curdir,tabpages |
@@ -275,13 +277,13 @@ augroup init | ||
275 | 277 | |
276 | 278 | autocmd BufWritePre *.c,*.h :WhitespaceCleanup |
277 | 279 | autocmd BufWritePre *.py :WhitespaceCleanup |
278 | - | |
279 | 280 | autocmd VimEnter,ColorScheme * highlight HighlightWordGroup gui=underline |
280 | 281 | |
281 | 282 | " read file templates (according to :help template) |
282 | 283 | autocmd BufNewFile workspace.vim 0r $LOCALAPPDATA/nvim/templates/workspace.vim |
283 | 284 | autocmd BufNewFile *.c 0r $LOCALAPPDATA/nvim/templates/file.c |
284 | 285 | autocmd BufNewFile *.h 0r $LOCALAPPDATA/nvim/templates/file.h |
286 | + | |
285 | 287 | augroup END |
286 | 288 | |
287 | 289 | " }}} |
@@ -299,7 +301,9 @@ vnoremap <Leader>` c`<C-R>-`<Esc> | ||
299 | 301 | vnoremap <Leader>( c(<C-R>-)<Esc> |
300 | 302 | vnoremap <Leader>[ c[<C-R>-]<Esc> |
301 | 303 | |
302 | -" remove overwritten mapping | |
304 | +nnoremap <BS> <C-w>c | |
305 | + | |
306 | +" remove overwritten mapping | |
303 | 307 | if exists("win32") || exists("win64") |
304 | 308 | silent! vunmap <C-X> |
305 | 309 | endif |
@@ -334,54 +338,62 @@ nnoremap <Leader>n :enew <bar> setfiletype markdown <bar> setlocal spell spellla | ||
334 | 338 | |
335 | 339 | nnoremap <char-252> :set invhlsearch<CR> |
336 | 340 | nnoremap <char-220> :set invrelativenumber<CR> |
337 | -nnoremap <char-246> [ | |
338 | -nnoremap <char-214> [[ | |
341 | +nnoremap <char-246> [ | |
339 | 342 | nnoremap <char-228> ] |
343 | +nnoremap <char-214> [[ | |
340 | 344 | nnoremap <char-196> ]] |
345 | +vnoremap <char-246> [ | |
346 | +vnoremap <char-228> ] | |
341 | 347 | |
342 | 348 | nnoremap <silent> <A-left> :call FastForwardAndRewind("rewind")<cr> |
343 | 349 | nnoremap <silent> <A-right> :call FastForwardAndRewind("fastforward")<cr> |
350 | +if has('nvim') | |
351 | + nnoremap <silent> <A-.> :tj <C-r><C-w><CR> | |
352 | + nnoremap <silent> <A-,> :pop<CR> | |
353 | + inoremap <C-Tab> <C-x><C-]> | |
354 | +endif | |
344 | 355 | |
345 | 356 | |
346 | -" jump to previous window | |
347 | -nnoremap <BS> <C-w>w | |
348 | -nnoremap <S-BS> <C-w>W | |
349 | - | |
350 | -nnoremap <F1> :edit %:p:h<CR> | |
351 | -nnoremap <F2> :find<Space> | |
352 | -nnoremap <F3> :buffer<Space> | |
353 | -nnoremap <F4> :tjump / | |
354 | -nnoremap <F5> :SCRun<Space> | |
355 | -nnoremap <F6> :Welcome<CR> | |
356 | -nnoremap <S-F5> :SCBuffer<CR> | |
357 | - | |
358 | -nnoremap <F7> :silent make<space><up><CR> | |
359 | -nnoremap <C-F7> :silent make<space><up> | |
360 | - | |
361 | -nnoremap <f8> :silent grep <C-r><C-w> | |
362 | -nnoremap <Leader>g :silent grep <C-r><C-w> | |
357 | +nnoremap <A-k> { | |
358 | +vnoremap <A-k> { | |
359 | +nnoremap <A-j> } | |
360 | +vnoremap <A-j> } | |
361 | + | |
362 | +nnoremap <F1> :edit %:p:h<CR> | |
363 | +nnoremap <F2> :find<Space> | |
364 | +nnoremap <F3> :buffer<Space> | |
365 | +nnoremap <F4> :cnext<CR>zz | |
366 | +nnoremap <S-F4> :cprev<CR>zz | |
367 | +nnoremap <C-F4> :cfirst<CR> | |
368 | +nnoremap <F12> :tjump <C-r><C-w><CR>zz | |
369 | +nnoremap <S-F12> :tjump / | |
370 | +nnoremap <F5> :SCRun<Space> | |
371 | +nnoremap <F6> :Welcome<CR> | |
372 | +nnoremap <S-F5> :SCBuffer<CR> | |
373 | + | |
374 | +nnoremap <F7> :silent make<space><up><CR> | |
375 | +nnoremap <C-F7> :silent make<space><up> | |
376 | +nnoremap <Leader>m :silent make<space><up><CR> | |
377 | +nnoremap <Leader>M :silent make<space><up> | |
378 | + | |
379 | +nnoremap <f8> :silent grep <C-r><C-w><CR> | |
380 | +nnoremap <Leader>g :silent grep <C-r><C-w> | |
381 | +nnoremap <Leader>G :silent grep<Space> | |
363 | 382 | |
364 | 383 | nnoremap <F11> :TagbarOpen<CR> |
365 | -" Mappings for fast quickfix access | |
366 | -nnoremap <F12> :cnext<CR>zz | |
367 | -nnoremap <A-j> :cnext<CR>zz | |
368 | -nnoremap <S-F12> :cprev<CR>zz | |
369 | -nnoremap <A-k> :cprev<CR>zz | |
370 | -nnoremap <C-F12> :cfirst<CR> | |
371 | - | |
372 | 384 | |
373 | 385 | " check my spelling |
374 | 386 | nnoremap <Leader>se :setlocal spell spelllang=en_us<CR> |
375 | 387 | nnoremap <Leader>sg :setlocal spell spelllang=de_de<CR> |
376 | -nnoremap <Leader>sn :setlocal nospell<CR> | |
388 | +nnoremap <Leader>so :setlocal nospell<CR> | |
377 | 389 | |
378 | 390 | " run Vims own grep on files directories |
379 | 391 | nnoremap <Leader>1 :wall<CR> :vimgrep //j <C-r>=simplify(fnameescape(expand("%:p:h")) . "\\*." . &filetype)<CR><C-b><C-Right><Right><Right> |
380 | 392 | nnoremap <Leader>2 :wall<CR> :vimgrep //j <C-r>=simplify(fnameescape(expand("%:p:h")) . "\\..\\**\\*." . &filetype)<CR><C-b><C-Right><Right><Right> |
381 | 393 | |
382 | 394 | if has("win32") || has("win64") |
383 | - nnoremap <Leader>x :silent execute "!start explorer " . expand ("%:p:h")<CR> | |
384 | - nnoremap <Leader>X :silent execute "!start cmd /k cd " . expand ("%:p:h")<CR> | |
395 | + nnoremap <Leader>X :silent execute "!start explorer " . expand ("%:p:h")<CR> | |
396 | + nnoremap <Leader>x :silent execute "!start cmd /k cd " . expand ("%:p:h")<CR> | |
385 | 397 | endif |
386 | 398 | |
387 | 399 | cabbrev <expr> \\ expand("%:p:h") |
@@ -393,18 +405,13 @@ cabbrev <expr> \\ expand("%:p:h") | ||
393 | 405 | augroup ginit |
394 | 406 | " clear group in case file sourced several times |
395 | 407 | autocmd! |
396 | - " write all buffers when lossing focus | |
408 | + " write all buffers when loosing focus | |
397 | 409 | autocmd FocusLost * :silent! wall |
410 | + " Reload changed buffers. Command rely on option 'autoread' | |
411 | + autocmd FocusGained * :checktime | |
398 | 412 | augroup END |
399 | 413 | |
400 | -colorscheme bleached | |
414 | +colorscheme breeze | |
401 | 415 | syntax on |
402 | 416 | |
403 | -" environment {{{ | |
404 | - | |
405 | -" English, please | |
406 | -let $LANG="en_US" | |
407 | - | |
408 | -" }}} | |
409 | - | |
410 | 417 | " vim:sw=2:tw=0:nocindent:foldmethod=marker |