dotfiles

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

commit 55dc877e172501c9a2bee9ee47c8384499e57d29
parent 2d741f40ae8d4d941405b916f5df9df9dd267760
Author: Paco Esteban <paco@onna.be>
Date:   Thu, 13 Dec 2018 15:21:52 +0100

noremaps netrw basic config and more

Diffstat:
vim/.vim/after/ftplugin/c.vim | 3+++
vim/.vim/after/ftplugin/mail.vim | 6+++---
vim/.vim/after/ftplugin/python.vim | 4++--
vim/.vim/vimrc | 34+++++++++++++++++++++-------------
4 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/vim/.vim/after/ftplugin/c.vim b/vim/.vim/after/ftplugin/c.vim @@ -17,3 +17,6 @@ if has('unix') setlocal path+=/usr/include setlocal path+=/usr/local/include endif + +" manual to section 3 +setlocal keywordprg=man\ -s\ 3 diff --git a/vim/.vim/after/ftplugin/mail.vim b/vim/.vim/after/ftplugin/mail.vim @@ -7,6 +7,6 @@ setlocal formatprg=fmt\ -72 setlocal spell setlocal spelllang=en_gb " and some optionals -nmap <leader>ca :setlocal spelllang=ca_es<CR> -nmap <leader>es :setlocal spelllang=es_es<CR> -nmap <leader>en :setlocal spelllang=en_gb<CR> +nmap <LocalLeader>ca :setlocal spelllang=ca_es<CR> +nmap <LocalLeader>es :setlocal spelllang=es_es<CR> +nmap <LocalLeader>en :setlocal spelllang=en_gb<CR> diff --git a/vim/.vim/after/ftplugin/python.vim b/vim/.vim/after/ftplugin/python.vim @@ -1,9 +1,9 @@ " style for python if executable('isort') - nnoremap <silent> <Leader>i :!isort %<CR><CR> + nnoremap <silent> <LocalLeader>i :!isort %<CR><CR> endif if executable('isort-3') - nnoremap <silent> <Leader>i :!isort-3 %<CR><CR> + nnoremap <silent> <LocalLeader>i :!isort-3 %<CR><CR> endif if executable('yapf') setlocal equalprg=yapf diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc @@ -31,7 +31,6 @@ set path-=/usr/include " do not assume C by default set path+=** " search current directory whole tree set completeopt+=longest set completeopt+=menuone -set nrformats+=alpha " with C-a can increment dec, hex, bin, and chars too set nrformats-=octal " and we do not care about octal (0 starting can be bad) set incsearch set hlsearch @@ -50,6 +49,8 @@ if executable('rg') set grepprg=rg\ --vimgrep endif set switchbuf=useopen,usetab,split " contols how to sw buffers with quickfix +let mapleader = "\\" +let maplocalleader = "\\" " }}} " Color {{{ @@ -72,19 +73,19 @@ augroup END " space bar un-highlights search noremap <silent> <Space> :silent noh<Bar>echo<CR> " better behaviour of > in visual mode -vnoremap > >gv -vnoremap < <gv +xnoremap > >gv +xnoremap < <gv " search with true regexp, not vim's ... nnoremap / /\v -vnoremap / /\v +xnoremap / /\v " next prev tab let i = 1 while i < 10 - execute 'nnoremap <leader>'.i.' '.i.'gt' + execute 'nnoremap <Leader>'.i.' '.i.'gt' let i += 1 endwhile -nmap <leader>[ :tabprevious<CR> -nmap <leader>] :tabnext<CR> +nnoremap <silent> <Leader>[ :tabprevious<CR> +nnoremap <silent> <Leader>] :tabnext<CR> " go fast to home end of line inoremap <C-e> <C-o>$ inoremap <C-a> <C-o>0 @@ -94,13 +95,13 @@ inoremap <C-b> <C-o>h " copy and paste from system easily if has("mac") nnoremap cp "*p - vnoremap cy "*y + xnoremap cy "*y else nnoremap cp "+p - vnoremap cy "+y + xnoremap cy "+y endif " \b calls make -nnoremap <leader>b :make<CR> +nnoremap <silent> <Leader>b :make<CR> " }}} " Plugins {{{ @@ -115,12 +116,12 @@ let g:ale_lint_on_text_changed = 'never' let g:ale_linters = { \ 'python': ['flake8'], - \ 'c': ['gcc'], + \ 'c': ['clang'], \ '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_clang_options = '-std=c11 -Wall -Wextra -I/usr/include -I/usr/local/include -I./lib -I.' let g:ale_c_parse_makefile = 1 " }}} @@ -129,7 +130,9 @@ let g:NERDSpaceDelims = 1 let g:NERDDefaultAlign = 'left' let g:NERDCommentEmptyLines = 1 let g:NERDTrimTrailingWhitespace = 1 -let g:NERDCompactSexyComs = 1 +let g:NERDCompactSexyComs = 0 +let g:NERDAltDelims_c = 1 +imap <C-c> <plug>NERDCommenterInsert " }}} " vim-go {{{ let g:go_highlight_functions = 1 @@ -160,6 +163,11 @@ endif " vimwiki {{{ let g:vimwiki_list = [{'path': '~/vimwiki'}, {'path': '~/Mobile/vimwiki'}] " }}} +" netrw {{{ +let g:netrw_liststyle = 3 " tree view +let g:netrw_banner = 0 " don't show banner +let g:netrw_browse_split = 3 " open files in new tab +" }}} netrw " }}} " Tabline {{{