diff --git a/README.md b/README.md index f0cbbbc..3403609 100755 --- a/README.md +++ b/README.md @@ -15,18 +15,17 @@ Install my dotfiles: $ ./install.sh ``` -This will install dotfiles for commonly used apps: if you want to install for -an app not included, provide that as an argument: +This will install dotfiles for commonly used apps: if you want to install for an app not +included, provide that as an argument: ```console $ ./install.sh i3 # installed i3 dotfiles ``` There are two potential gotchas: -1. There are submodules in this repo (mostly vim/neovim plugins) which didn't - get populated when you cloned the repo. See above. - -2. `stow` is not installed on the system. There is a bash equivalent that is - close enough in this repo that the install script will automatically use. +1. There are submodules in this repo (mostly vim/neovim plugins) which didn't get + populated when you cloned the repo. See above. +2. `stow` is not installed on the system. There is a bash equivalent that is close + enough in this repo that the install script will automatically use. diff --git a/vim/.config/vim/vimrc b/vim/.config/vim/vimrc index a123d3a..b3e13a6 100644 --- a/vim/.config/vim/vimrc +++ b/vim/.config/vim/vimrc @@ -1,9 +1,30 @@ syntax on set smarttab ts=2 sw=2 -set softtabstop=2 +set softtabstop=2 set expandtab set autoindent +" line length is 88 +set textwidth=88 + +" Enable soft wrapping +set wrap + +" Wrap at word boundaries +set linebreak + +" Maintain indentation on wrapped lines +set breakindent + +" Optional: visual indicator for wrapped lines +set showbreak=↪\ + +" Navigate visual lines instead of logical lines +nnoremap j gj +nnoremap k gk +vnoremap j gj +vnoremap k gk + set backspace=indent,eol,start set background=dark @@ -12,6 +33,10 @@ colorscheme theunixzoo "colorscheme aomi-grayscale "colorscheme solarized8 +" any trailing spaces are indicated by a · +set list +set listchars=trail:· + "source /home/jswank/.config/nvim/colors-now "set gfn=Droid\ Sans\ Mono\ 10 @@ -21,9 +46,6 @@ set guioptions-=T "use semicolon as colon for commands nmap ; : -"disable mouse support (nvim) -set mouse= - filetype plugin on filetype indent on set ofu=syntaxcomplete#Complete# @@ -31,12 +53,7 @@ set ofu=syntaxcomplete#Complete# " au FileType python setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4 au FileType markdown setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4 -" enable snippets -" let g:UltiSnipsExpandTrigger="" -" list all snippets -" let g:UltiSnipsListSnippets="" - -" typing idate inserts the current date +" typing idate inserts the current date iab idate =strftime("%Y-%m-%d") " use \ toc to insert a table of contents for markdown from the current line to EOF @@ -65,7 +82,6 @@ set cursorline " highlights the current line " Search down into subfolders set path+=** - " netrw config let g:netrw_banner=0 " disable annoying banner let g:netrw_browse_split=0 " open in prior window @@ -78,7 +94,7 @@ let g:netrw_liststyle=3 " tree view " - /v/t to open in an h-split/v-split/tab " - check |netrw-browse-maps| for more mappings -" fzf-lua shortcuts +" fzf.vim shortcuts nnoremap Files nnoremap Buffers nnoremap Rg @@ -111,25 +127,24 @@ let g:go_highlight_build_constraints = 1 " disable folding for markdown let g:vim_markdown_folding_disabled = 1 +" ancient stuff "let g:hcl_fmt_autosave = 1 "let g:tf_fmt_autosave = 1 "let g:nomad_fmt_autosave = 1 -" ancient stuff -" "autocmd BufRead,BufNewFile *.go set makeprg=go\ build "map gr :!gorun % -"for javascript: +"for javascript: "use google closure to generate errors ":set makeprg=closure\ --js\ % "javac style errors -":setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%# +":setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%# "autocmd BufRead,BufNewFile *.js :call My_JS() -"function! My_JS() +"function! My_JS() " set makeprg=closure\ --js\ % -" setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%# +" setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%# "endfunction "map hh :!tidy -q -i --show-errors 0