From b83cf688b4ad84fe7f500e18ca847e1423e5f806 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 13 May 2015 10:16:07 +0100 Subject: added autocommand to restore last cursor position --- vimrc | 28 ++++++++++++++++++++++------ zshrc | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/vimrc b/vimrc index 7640573..577b21d 100644 --- a/vimrc +++ b/vimrc @@ -21,6 +21,7 @@ Plugin 'terryma/vim-multiple-cursors' Plugin 'jeetsukumaran/vim-buffergator' Plugin 'AndrewRadev/splitjoin.vim' Plugin 'kien/ctrlp.vim' +Plugin 'majutsushi/tagbar' Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/syntastic' Plugin 'sjl/Gundo.vim' @@ -38,8 +39,6 @@ filetype plugin indent on syntax on "" Plugins options -let g:buffergator_display_regime='bufname' -let g:buffergator_vsplit_size=30 let g:LatexBox_Folding=0 let g:LatexBox_latexmk_preview_continuously=1 @@ -63,6 +62,9 @@ let g:airline_section_z = '%3p%%|%3l|%3c' let g:airline_theme='solarized' let g:airline#extensions#tabline#enabled = 0 +let g:buffergator_display_regime='bufname' +let g:buffergator_vsplit_size=30 + let g:bufferline_active_buffer_left = '' let g:bufferline_active_buffer_right = '' let g:bufferline_echo = 0 @@ -77,8 +79,11 @@ let g:ctrlp_show_hidden = 1 let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] let g:ctrlp_working_path_mode = 'r' -let g:syntastic_cpp_compiler = 'clang++' -let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++' +let g:syntastic_cpp_compiler = "g++" +let g:syntastic_cpp_compiler_options = "-std=c++11 -Wall -Wextra -Wpedantic" + +let g:tagbar_width = 30 +let g:tagbar_show_linenumbers=1 let g:tex_conceal= 'adgm' let g:tex_flavor='latex' @@ -171,8 +176,10 @@ nnoremap ps :PluginSearch " Toggles nnoremap cop :set paste! +nnoremap tb :BuffergatorToggle nnoremap tg :GitGutterToggle -nnoremap tt :NERDTreeToggle +nnoremap tn :NERDTreeToggle +nnoremap tt :TagbarToggle nnoremap tu :GundoToggle " Sourcing @@ -181,6 +188,7 @@ nnoremap sc :source % " File edits nnoremap es :UltiSnipsEdit +nnoremap em :e ~/.mutt/muttrc nnoremap ev :e ~/.vimrc nnoremap ez :e ~/.zshrc nnoremap et :e ~/.tmux.conf @@ -216,7 +224,15 @@ vnoremap : , nnoremap , : vnoremap , : -"" Neovim specific +"" Experimental +augroup cursorPosition + au! + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif +augroup END + if has('nvim') tmap jk endif diff --git a/zshrc b/zshrc index c5fef61..82704c7 100644 --- a/zshrc +++ b/zshrc @@ -34,7 +34,7 @@ alias -s pdf=zathura alias -s py=vim # Directories -alias u='cd ~/Dropbox/phd' +alias u='cd ~/Dropbox/phd/papers/spectral/code/finite' alias uc='cd ~/Dropbox/phd/programs' alias ul='cd ~/Dropbox/phd/literature' alias ur='cd ~/Dropbox/phd/reports' -- cgit v1.2.3