From b15bb4aa7bf5ab9741a694d1c1abc7ab359ec06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 21 Sep 2016 16:35:54 +0200 Subject: Update vim configuration --- vimrc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/vimrc b/vimrc index 9325dfe..c16bd09 100644 --- a/vimrc +++ b/vimrc @@ -15,6 +15,8 @@ set undofile set undodir=~/.cache/vim-undo// set hlsearch set foldmethod=syntax +set wildmode=longest:full,full +set wildmenu colorscheme elflord @@ -61,10 +63,16 @@ set directory=$HOME/.cache/vim// " Note: to start use "\ t m" let g:table_mode_corner="|" -set tags=.tags,./tags +set tags=./.tags,.tags " Setup autotag to look for .tags file let g:autotagTagsFile=".tags" +" Enable mouse +set mouse=a +set ttymouse=urxvt +" We are always on fast tty (maybe remove this on servers?) +set ttyfast + " Some fast shortcuts map :call InitBase() nmap :TagbarOpen fc @@ -102,7 +110,7 @@ endfunction function InitC() call InitBase() - map gggqG2 + " TODO bind F2 to execute gnu ident on whole file and ensure that if it fails, no change is done. map :w map :wa map :w:make @@ -111,11 +119,6 @@ function InitC() map :cl " TODO check if .tags exists and alternativelly generate - - autocmd BufNewFile,BufRead *.c set formatprg=indent\ -kr\ -cp1\ -cd1\ -ts4\ -nut\ -brf - autocmd BufNewFile,BufRead *.cpp set formatprg=indent\ -kr\ -cp1\ -cd1\ -ts4\ -nut\ -brf - autocmd BufNewFile,BufRead *.h set formatprg=indent\ -kr\ -cp0\ -cd1\ -ts4\ -nut\ -brf - autocmd BufNewFile,BufRead *.hpp set formatprg=indent\ -kr\ -cp1\ -cd1\ -ts4\ -nut\ -brf endfunction let g:ycm_path_to_python_interpreter="/usr/bin/python3" -- cgit v1.2.3