misc update

This commit is contained in:
Bruno Carlin 2020-10-05 13:19:22 +02:00
parent beff711346
commit d6e546958e
10 changed files with 57 additions and 14 deletions

View file

@ -45,6 +45,7 @@ set directory=~/.vim/swap//
set undodir=~/.vim/undo//
set splitright
set cursorline
set concealcursor=nc
" flag lines wider than 80 char
highlight ColorColumn ctermbg=magenta
@ -66,6 +67,13 @@ if has("autocmd")
autocmd FileType md setlocal tw=80 ts=2 sts=2 sw=2 expandtab
autocmd FileType vimwiki setlocal tw=80 ts=2 sts=2 sw=2 expandtab
autocmd FileType sh setlocal tw=80 ts=2 sts=2 sw=2 expandtab
autocmd FileType java setlocal tw=80 ts=2 sts=2 sw=2 expandtab
autocmd BufNewFile,BufRead neomutt-* set spell spelllang=fr
endif
if executable('rg')
set grepprg=rg\ --vimgrep\ --hidden\ --glob\ '!.git'
endif
" Airline options
@ -81,7 +89,8 @@ let g:airline#extensions#tabline#enabled = 1
" autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Vim-go options
let g:go_fmt_command = "goimports"
"let g:go_fmt_command = "goimports"
let g:go_fmt_command = "gofumports"
let g:go_fmt_autosave = 1
let g:go_metalinter_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint']
let g:go_metalinter_autosave = 0
@ -136,7 +145,7 @@ let g:indentLine_char = '▏'
let g:ale_completion_enabled = 0
let g:ale_open_list = 1
let g:ale_linters = {
\ 'go': ['gofmt', 'golint', 'gopls', 'golangci-lint']
\ 'go': ['gofmt', 'gopls', 'golangci-lint']
\}
let g:ale_go_golangci_lint_options = ''
let g:ale_go_golangci_lint_executable = 'golangci-lintw'
@ -204,6 +213,8 @@ call plug#end()
""
nmap <silent> <space>w<space>w :call mkdir(strftime("diary/%Y/%m"), "p", 0755) \| exec "edit " . strftime("diary/%Y/%m/%Y-%m-%d.md")<CR>
nmap <silent> <space>dt :execute ":normal! a" . strftime("%H:%M ")<CR>
nmap <silent> <space>dn :execute ":normal! o* " . strftime("%H:%M ")<CR>
""
"" Keymappings