dotfiles

My dotfiles, nothing really interesting to see ...
git clone https://git.onna.be/dotfiles.git
Log | Files | Refs | README

commit 2d741f40ae8d4d941405b916f5df9df9dd267760
parent 1804c19fb6c8c2f58f5fd01fcb883c051cd70bdf
Author: Paco Esteban <paco@onna.be>
Date:   Sun,  9 Dec 2018 19:39:21 +0100

adapting vim

Diffstat:
vim/.vim/UltiSnips/all.snippets | 4++--
vim/.vim/after/ftplugin/c.vim | 6++++--
vim/.vim/after/ftplugin/go.vim | 6++++--
vim/.vim/after/ftplugin/perl.vim | 6++++--
vim/.vim/after/ftplugin/python.vim | 15+++++++++++----
vim/.vim/spell/en.utf-8.add | 2++
vim/.vim/spell/en.utf-8.add.spl | 0
vim/.vim/templates/template.pl | 2+-
vim/.vim/vimrc | 25++++++++++++++++++++++++-
9 files changed, 52 insertions(+), 14 deletions(-)

diff --git a/vim/.vim/UltiSnips/all.snippets b/vim/.vim/UltiSnips/all.snippets @@ -39,7 +39,7 @@ snip += box[3]` $0 endsnippet -snippet fold "Insert a vim fold marker" b +snippet foldo "Insert a vim fold marker" b `!p snip.rv = get_comment_format()[0]` ${1:Fold description} `!p snip.rv = foldmarker()[0]`${2:1} `!p snip.rv = get_comment_format()[2]` endsnippet @@ -47,7 +47,7 @@ snippet foldc "Insert a vim fold close marker" b `!p snip.rv = get_comment_format()[0]` ${2:1}`!p snip.rv = foldmarker()[1]` `!p snip.rv = get_comment_format()[2]` endsnippet -snippet foldp "Insert a vim fold marker pair" b +snippet fold "Insert a vim fold marker pair" b `!p snip.rv = get_comment_format()[0]` ${1:Fold description} `!p snip.rv = foldmarker()[0]` `!p snip.rv = get_comment_format()[2]` ${2:${VISUAL:Content}} `!p snip.rv = get_comment_format()[0]` `!p snip.rv = foldmarker()[1]` $1 `!p snip.rv = get_comment_format()[2]` diff --git a/vim/.vim/after/ftplugin/c.vim b/vim/.vim/after/ftplugin/c.vim @@ -1,6 +1,8 @@ " (astyle) -nnoremap <silent> <Leader>t :mark t <bar> execute'%!astyle' <bar> execute 'normal! `t' <bar> delmarks t<CR> -vnoremap <buffer> <Leader>t :!astyle<CR> +if executable('astyle') + setlocal equalprg=astyle + nnoremap g= :mark t <bar> execute 'normal! gg=G' <bar> execute 'normal! `t' <bar> delmarks t<CR> +endif setlocal colorcolumn=80 diff --git a/vim/.vim/after/ftplugin/go.vim b/vim/.vim/after/ftplugin/go.vim @@ -1,3 +1,5 @@ setlocal noexpandtab -nnoremap <silent> <Leader>t :mark t <bar> execute'%!gofmt' <bar> execute 'normal! `t' <bar> delmarks t<CR> -vnoremap <silent> <Leader>t :!gofmt<CR> +if executable('gofmt') + setlocal equalprg=gofmt + nnoremap g= :mark t <bar> execute 'normal! gg=G' <bar> execute 'normal! `t' <bar> delmarks t<CR> +endif diff --git a/vim/.vim/after/ftplugin/perl.vim b/vim/.vim/after/ftplugin/perl.vim @@ -1,4 +1,6 @@ " perltidy -nnoremap <silent> <Leader>t :mark t <bar> execute'%!perltidy' <bar> execute 'normal! `t' <bar> delmarks t<CR> -vnoremap <silent> <Leader>t :!perltidy<CR> +if executable('perltidy') + setlocal equalprg=perltidy + nnoremap g= :mark t <bar> execute 'normal! gg=G' <bar> execute 'normal! `t' <bar> delmarks t<CR> +endif setlocal colorcolumn=80 diff --git a/vim/.vim/after/ftplugin/python.vim b/vim/.vim/after/ftplugin/python.vim @@ -1,7 +1,14 @@ -" and for python -nnoremap <silent> <Leader>i :!isort %<CR><CR> -nnoremap <silent> <Leader>t :mark t <bar> execute'%!yapf' <bar> execute 'normal! `t' <bar> delmarks t<CR> -vnoremap <silent> <Leader>t :!yapf<CR> +" style for python +if executable('isort') + nnoremap <silent> <Leader>i :!isort %<CR><CR> +endif +if executable('isort-3') + nnoremap <silent> <Leader>i :!isort-3 %<CR><CR> +endif +if executable('yapf') + setlocal equalprg=yapf + nnoremap g= :mark t <bar> execute 'normal! gg=G' <bar> execute 'normal! `t' <bar> delmarks t<CR> +endif setlocal textwidth=79 setlocal shiftround setlocal colorcolumn=80 diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add @@ -13,3 +13,5 @@ paco onna gophermap gophermaps +github +routable diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl Binary files differ. diff --git a/vim/.vim/templates/template.pl b/vim/.vim/templates/template.pl @@ -2,7 +2,7 @@ # # ... -use v5.26; +use v5.24; use strict; use warnings; diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc @@ -19,7 +19,7 @@ set hidden " avoiding annoying messages (no write since last change) set splitright " split windows on the right ! set splitbelow " split windows below ! set list " mark non-printable chars as per above instructions -set listchars=tab:▸\ ,trail:·,precedes:«,extends:»,nbsp:+ +set listchars=tab:⇥\ ,trail:·,precedes:«,extends:»,nbsp:+ set wildmenu set wildmode=longest,list:longest " command completion works as I want set foldmethod=syntax @@ -46,6 +46,10 @@ set include= " don't asume C by default set linebreak " pretier line breaks set showbreak=... set showcmd " shows what I'm typing in normal mode +if executable('rg') + set grepprg=rg\ --vimgrep +endif +set switchbuf=useopen,usetab,split " contols how to sw buffers with quickfix " }}} " Color {{{ @@ -100,10 +104,25 @@ nnoremap <leader>b :make<CR> " }}} " Plugins {{{ +" internal {{{ +" better behaviour of % +packadd! matchit +" }}} internal " ALE {{{ nmap <silent> <Leader>k <Plug>(ale_previous_wrap) nmap <silent> <Leader>j <Plug>(ale_next_wrap) let g:ale_lint_on_text_changed = 'never' + +let g:ale_linters = { + \ 'python': ['flake8'], + \ 'c': ['gcc'], + \ 'go': ['gofmt'], + \ 'sh': ['shellcheck'], + \ 'perl': ['perl', 'perltidy'], + \ } +let g:ale_c_gcc_options = '-std=gnu99 -Wall -Wextra -I/usr/include -I/usr/local/include -I.' +let g:ale_c_parse_makefile = 1 + " }}} " Nerdcommenter {{{ let g:NERDSpaceDelims = 1 @@ -126,6 +145,7 @@ let g:go_info_mode = 'guru' " }}} " UltiSnips {{{ let g:UltiSnipsEnableSnipMate = 0 +let g:snips_author = "paco" " }}} " Autopairs {{{ " fixing how urxvt deals with Meta key @@ -137,6 +157,9 @@ if !has("mac") imap } <M-}> endif " }}} +" vimwiki {{{ +let g:vimwiki_list = [{'path': '~/vimwiki'}, {'path': '~/Mobile/vimwiki'}] +" }}} " }}} " Tabline {{{