X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/771eb3ba0503e3a2c34767b4ae8a42da9591a5ae..b59e03e7dfdb3f217e08585a87a1eae35fc74208:/vim/vimrc?ds=inline diff --git a/vim/vimrc b/vim/vimrc index 1dce66c..0651305 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -27,7 +27,6 @@ Plugin 'kshenoy/vim-signature' Plugin 'majutsushi/tagbar' Plugin 'raimondi/delimitmate' " Plugin 'rking/ag.vim' -Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/syntastic' Plugin 'shougo/vimproc.vim' Plugin 'shougo/unite.vim' @@ -98,13 +97,16 @@ set smartcase " override 'ignorecase' when pattern has upper case char set hlsearch " highlight all matches for the last used search pattern set nostartofline " don't move the cursor to the first non-blank char of a line -set path=.,include/,../include/,/usr/include/c++/*,/opt/ros/hydro/include +set path+=. +set path+=include/ +set path+=../include/ +set path+=/usr/include/c++/* " displaying text {{{2 -set scrolloff=5 " number of screen lines to show around the cursor set nowrap " long lines wrap set linebreak " wrap long lines at a character in 'breakat' set showbreak=↪ " show these chars for wrapped lines +set breakindent " preserve indentation in wrapped text set lazyredraw " don't redraw while executing macros @@ -112,12 +114,14 @@ set list " show chars defined in 'listchars' set listchars=tab:❭\ " list of strings used for list mode set listchars+=extends:❯,precedes:❮ " Only shown when not in insert mode +au InsertLeave * :set listchars+=trail:· augroup trailing au! au InsertEnter * :set listchars-=trail:· au InsertLeave * :set listchars+=trail:· augroup END +set scrolloff=5 " number of screen lines to show around the cursor set sidescroll=1 " number of collumns to scroll set sidescrolloff=1 " don't scroll over the listchars @@ -162,11 +166,25 @@ set backspace=indent,eol,start " allow backspacing over everything in insert mo set showmatch " Show matching brackets. set nojoinspaces " don't use two spaces after '.' when joining a line -set formatoptions=jcrnql +set formatoptions+=j " Delete comment leader when joining lines +set formatoptions+=c " Autowrap comments using textwidth +set formatoptions+=r " Insert comment leader after hitting +set formatoptions+=n " Recognize numbered lists +set formatoptions+=q " Allow formatting of comments with "gq". +set formatoptions+=l " do not wrap lines that have been longer when starting insert mode already +set formatoptions+=t " Auto-wrap text using textwidth +set formatoptions-=o " Do not insert comment leader after hitting o or O in normal mode set nrformats=hex " number formats recognized for CTRL-A and CTRL-X commands -set complete=.,w,b,u,t +set complete=. " scan the current buffer ( 'wrapscan' is ignored) +set complete+=w " scan buffers from other windows +set complete+=b " scan other loaded buffers that are in the buffer list +set complete+=u " scan the unloaded buffers that are in the buffer list +set complete+=t " scan tags +set complete+=i " scan current and included files +set complete+=kspell " use the currently active spell checking |spell| + " whether to use a popup menu for Insert mode completion set completeopt=longest,menuone,preview @@ -191,8 +209,10 @@ set foldopen+=jump set viewoptions=cursor " only save cursor position " diff mode {{{2 -" vertical splits and ignore white space in diffs -set diffopt=filler,vertical,iwhite +set diffopt+=filler " show filler lines +set diffopt+=vertical " always vertical split +set diffopt+=iwhite " ignore white space +set diffopt+=context:10 " 10 lines context between changes " reading and writing files {{{2 set modeline " read modelines @@ -237,12 +257,17 @@ set wildignore+=*.luac " Lua byte code set wildignore+=*.pyc " Python byte code set wildignore+=*.orig " Merge resolution files +" language specific {{{2 +set isfname-== " don't treat `=` as being part of filenames + " various {{{2 set virtualedit=all " let cursor move past last char in mode set viminfo='100,<50,s10,h,n$XDG_CACHE_HOME/vim/viminfo " viminfo defaults but save file in .cache set viewdir=$XDG_CACHE_HOME/vim/view// +set sessionoptions+=unix,slash " damn windows and it's silly ways + " autocmds {{{1 " Resize splits when the window is resized {{{2 augroup resize @@ -470,15 +495,6 @@ nmap cog IndentGuidesToggle nmap [og IndentGuidesEnable nmap ]og IndentGuidesDisable -" NERDTree {{{2 -" open/close NERDTree with \e -nmap e :NERDTreeToggle -nmap :NERDTreeToggle -" to open files/dirs -let NERDTreeMapActivateNode='l' -" close vim if only NERDTree is open -autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif - " python-mode {{{2 let g:pymode_rope_completion = 0