]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: don't waste a byte every line
[dotfiles.git] / vim / vimrc
index 86d5bfbc85c293684283924e12fa4bb4105ff1de..0651305336a7e407f12526f075fb70e2e0e7f249 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -172,6 +172,8 @@ 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 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
 
@@ -180,6 +182,8 @@ 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
@@ -208,6 +212,7 @@ set viewoptions=cursor          " only save cursor position
 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
@@ -252,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 <C-V> 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