aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2016-09-21 16:35:54 +0200
committerKarel Kočí <karel.koci@nic.cz>2016-09-21 16:35:54 +0200
commitb15bb4aa7bf5ab9741a694d1c1abc7ab359ec06c (patch)
treec43a260d56e307a8bb312725dcb7e50c854d573d /vimrc
parenta56bd141d20f99100d831682ef73e30033e1b108 (diff)
downloadmyconfigs-b15bb4aa7bf5ab9741a694d1c1abc7ab359ec06c.tar.gz
myconfigs-b15bb4aa7bf5ab9741a694d1c1abc7ab359ec06c.tar.bz2
myconfigs-b15bb4aa7bf5ab9741a694d1c1abc7ab359ec06c.zip
Update vim configuration
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc17
1 files 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 <F2> :call InitBase()<cr>
nmap <F9> :TagbarOpen fc<cr>
@@ -102,7 +110,7 @@ endfunction
function InitC()
call InitBase()
- map <F2> gggqG2<c-o>
+ " TODO bind F2 to execute gnu ident on whole file and ensure that if it fails, no change is done.
map <F3> :w<cr>
map <F4> :wa<cr>
map <F5> :w<cr>:make<cr>
@@ -111,11 +119,6 @@ function InitC()
map <F8> :cl<cr>
" 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"