Add more refinements.

This commit is contained in:
Thomas Gideon 2015-10-13 21:35:19 -04:00
parent e148ba3363
commit 73c84169ff
4 changed files with 68 additions and 32 deletions

2
gvimrc
View file

@ -8,7 +8,7 @@ set lines=9999
" from the help, recommended for widest possible " from the help, recommended for widest possible
set columns=9999 set columns=9999
set background=dark set background=dark
" enable antialiasing for environments supporting it "" enable antialiasing for environments supporting it
set anti set anti
set guioptions-=r set guioptions-=r
set guioptions-=b set guioptions-=b

View file

@ -1,9 +1,17 @@
" set a smaller indent
autocmd filetype markdown set ts=2 autocmd filetype markdown set ts=2
autocmd filetype markdown set sw=2 " like text files, don't break
autocmd filetype markdown set expandtab "autocmd filetype markdown set tw=0
autocmd filetype markdown set nolinebreak "" keep soft breaks between words
autocmd filetype markdown set fdm=indent "autocmd filetype markdown set nolinebreak
autocmd filetype markdown set tw=0 "" fold on what indents there are
autocmd filetype markdown set smarttab "autocmd filetype markdown set fdm=indent
autocmd filetype markdown set smartindent "" smarten indent handling
autocmd FileType javascript set spell "autocmd filetype markdown set smartindent
"" turn off line width hint
"autocmd FileType markdown set colorcolumn=0
"
"if has("gui_running")
" " narrow the gui window for text wrangling
" autocmd FileType markdown set columns=120
"endif

View file

@ -1 +1,23 @@
set tw=0 " don't hard break text
autocmd FileType text set tw=0
" keep soft breaks between words
autocmd FileType text set linebreak
" turn list off as it interferes with soft wrapping
autocmd FileType text set nolist!
" pull the wrap margin in given my preference for wide terms and windows
autocmd FileType text set wrapmargin=20
" turn off breaking when typing new text
autocmd FileType text set formatoptions-=t
" turn off line width hint
autocmd FileType text set colorcolumn=0
" open full screen with macvim
if has("gui_macvim")
set fuoptions=maxvert,maxhorz
au GUIEnter * set fullscreen
endif
if has("gui_running")
" narrow the gui window for text wrangling
autocmd FileType text set columns=80
endif

26
vimrc
View file

@ -1,9 +1,25 @@
" set the directory where my vimrc git project is located " set the directory where my vimrc git project is located
source ~/.vimrc_local source ~/.vimrc_local
" N.B. put settings that file type specific configs will override here
"
" even with the nice space/tab autodetect, prefer 4 for tab stops " even with the nice space/tab autodetect, prefer 4 for tab stops
" but let file type specifics override (for instance a setting of 2 for markdown " but let file type specifics override (for instance a setting of 2 for markdown
set ts=4 set ts=4
" default to folding on syntax
set fdm=syntax
" set a readable width
set textwidth=80
" make white space visible, where that matters
set list
" set up folding preferences
set fde=1
" vim's spelling is smart enough for code, to only check comments
set spell
" add a hint for long lines
set colorcolumn=120
" default to expanding tabs, I'm not insane
set expandtab
" source aux files also under git control " source aux files also under git control
let oldwd = getcwd() let oldwd = getcwd()
@ -26,9 +42,6 @@ syntax on
set number set number
set relativenumber set relativenumber
" make white space visible, where that matters
set list
" it is a big fat key, after all " it is a big fat key, after all
let mapleader = "\<Space>" let mapleader = "\<Space>"
@ -55,20 +68,13 @@ set sbr=+
" always on status line " always on status line
set laststatus=2 set laststatus=2
" set up folding preferences
set fde=1
set fdm=syntax
" let backspace work more naturally " let backspace work more naturally
set backspace=start,indent,eol set backspace=start,indent,eol
" set a readable width
set textwidth=80
" favor modern encoding " favor modern encoding
set enc=utf-8 set enc=utf-8
" more readable config for list mode " more readable config for list mode
set listchars+=nbsp,tab:»·,trail set listchars+=nbsp,tab:»·,trail
set listchars-=eol:$ set listchars-=eol:$
" add a hint for long lines
set colorcolumn=120
" smarter handling of case during search " smarter handling of case during search
set ignorecase set ignorecase
set smartcase set smartcase