]> git.rmz.io Git - dotfiles.git/commitdiff
vim: format some array options
authorSamir Benmendil <me@rmz.io>
Thu, 27 Aug 2015 00:02:23 +0000 (01:02 +0100)
committerSamir Benmendil <me@rmz.io>
Thu, 27 Aug 2015 01:33:49 +0000 (02:33 +0100)
vim/ftplugin/roscpp.vim
vim/vimrc

index c43b32e86697df6b3ff351dbc0057da927bfbb7f..40267ba1e6ddbae97fcf246a6ef36047928bf797 100644 (file)
@@ -1,3 +1,4 @@
+set path+=/opt/ros/hydro/include
 augroup fs_roscpp
     autocmd!
     autocmd BufEnter *.cpp let b:fswitchdst  = 'h'
index 10e5770e3f22338bc5a9dcc8546e3e0fc47bc2dc..86d5bfbc85c293684283924e12fa4bb4105ff1de 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -97,7 +97,10 @@ 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 nowrap                      " long lines wrap
@@ -163,11 +166,21 @@ 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 <Enter>
+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 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
+
 " whether to use a popup menu for Insert mode completion
 set completeopt=longest,menuone,preview
 
@@ -192,8 +205,9 @@ 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
 
 " reading and writing files {{{2
 set modeline                    " read modelines