2018-07-13 12:08:08 -05:00
|
|
|
scriptencoding utf8
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" ALE completeopt recommendation
|
|
|
|
set completeopt=menu,menuone,preview,noselect,noinsert
|
2018-11-01 11:06:55 -05:00
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" line number defaults
|
|
|
|
set nonumber
|
|
|
|
set norelativenumber
|
|
|
|
|
|
|
|
" different settings if using vim as a manpage viewer
|
|
|
|
" if exists('asmanviewer')
|
|
|
|
" set nonumber " no line numbers when viewing a man page
|
|
|
|
" set norelativenumber " no line numbers when viewing a man page
|
|
|
|
" else
|
|
|
|
" set nonumber " line numbers
|
|
|
|
" set norelativenumber " line numbers
|
|
|
|
" endif
|
2017-12-21 12:19:25 -06:00
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" use tabs at a two-space width like God intended
|
2017-12-21 12:19:25 -06:00
|
|
|
set tabstop=2
|
|
|
|
set shiftwidth=2
|
|
|
|
set softtabstop=2
|
|
|
|
set noexpandtab
|
|
|
|
|
|
|
|
" auto/smart indent
|
|
|
|
set autoindent smartindent
|
|
|
|
|
|
|
|
" show certain whitespace characters
|
|
|
|
set list
|
|
|
|
set nostartofline
|
|
|
|
set listchars=trail:·,tab:\ \ ,trail:~
|
|
|
|
" set listchars=eol:\ ,tab:>-,trail:~,extends:>,precedes:<,space:·
|
|
|
|
|
|
|
|
" try and keep text (and code) to a width of 80 characters
|
|
|
|
set wrap
|
|
|
|
set linebreak
|
|
|
|
set breakindent
|
|
|
|
set textwidth=80
|
2018-07-13 12:08:08 -05:00
|
|
|
set formatoptions=crql1j " :h fo-table
|
2017-12-21 12:19:25 -06:00
|
|
|
|
|
|
|
" handle window title
|
|
|
|
set title
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" limit syntax highlighting line length
|
|
|
|
set synmaxcol=500
|
2017-12-21 12:19:25 -06:00
|
|
|
|
|
|
|
" don't highlight the current line
|
|
|
|
set nocursorline
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" don't highlight the current column
|
|
|
|
" set nocursorcolumn
|
|
|
|
|
|
|
|
" OBSOLETE: colors columns past 80
|
|
|
|
" let &colorcolumn=join(range(81,400),",")
|
2017-12-21 12:19:25 -06:00
|
|
|
|
|
|
|
" highlight the 81st character in a line where it exists
|
|
|
|
highlight ColorColumn ctermbg=magenta ctermfg=7
|
|
|
|
call matchadd('ColorColumn', '\%81v', 100)
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" set noshowcmd
|
|
|
|
" set nowildmenu
|
|
|
|
" set wildmode=longest,list,full
|
|
|
|
set cpoptions-=$ " make buffer options more global
|
|
|
|
set noshowmatch " don't briefly highlight matching brackets
|
|
|
|
set mouse=a " enable mouse use
|
|
|
|
set mousehide " hide mouse when typing
|
|
|
|
set backspace=indent,eol,start " sane backspace
|
|
|
|
set noruler " hide the ruler - we have airline
|
|
|
|
set lazyredraw " don't draw during macros and other such things
|
|
|
|
set scrolloff=8 " keep lines above and below cursor (padding)
|
|
|
|
set sidescrolloff=15 " same but for columns
|
|
|
|
set splitright " don't split left
|
|
|
|
set splitbelow " don't split top
|
|
|
|
set noerrorbells " shhhh, vim
|
|
|
|
set visualbell " but visual noise for alerts is ok
|
|
|
|
set nobackup " sessions handle this quite nicely
|
|
|
|
set nowritebackup " no but really they do
|
|
|
|
set noswapfile " no seriously sessions are cool
|
|
|
|
set timeout " key combo mapping timeout
|
2019-11-17 09:05:56 -06:00
|
|
|
set ttimeoutlen=100 " ms delay for tapping key combos
|
|
|
|
set timeoutlen=150 " ms for key combo mapping timeout
|
2019-02-04 01:43:53 -06:00
|
|
|
set isfname+=32 " allow filenames to show them 32s
|
2017-12-21 12:19:25 -06:00
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" no freakin' bell
|
|
|
|
set visualbell t_vb=
|
2017-12-21 12:19:25 -06:00
|
|
|
if has('autocmd')
|
2019-03-13 07:36:53 -05:00
|
|
|
augroup DisableVisualBell
|
2018-07-13 12:08:08 -05:00
|
|
|
autocmd GUIEnter * set visualbell t_vb=
|
|
|
|
augroup END
|
2017-12-21 12:19:25 -06:00
|
|
|
endif
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" color scheme
|
2020-01-17 03:02:53 -06:00
|
|
|
let base16colorspace=16
|
2017-12-21 12:19:25 -06:00
|
|
|
set background=dark
|
2018-07-13 12:08:08 -05:00
|
|
|
syntax enable
|
2017-12-21 12:19:25 -06:00
|
|
|
colorscheme base16-donokai
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" hide stuff
|
2017-12-21 12:19:25 -06:00
|
|
|
highlight SignColumn ctermbg=black guibg=black
|
|
|
|
highlight GitGutterAdd ctermbg=black guibg=black
|
|
|
|
highlight GitGutterDelete ctermbg=black guibg=black
|
|
|
|
highlight GitGutterChange ctermbg=black guibg=black
|
|
|
|
highlight GitGutterChangeDelete ctermbg=black guibg=black
|
|
|
|
|
|
|
|
hi NonText ctermfg=black guifg=black
|
|
|
|
|
|
|
|
set hidden " allows buffer switching without saving
|
2019-12-12 11:02:24 -06:00
|
|
|
set shortmess+=Ia " hide vim intro, skip lots of file messages/prompts
|
2017-12-21 12:19:25 -06:00
|
|
|
set history=1000
|
|
|
|
|
|
|
|
" undo files
|
|
|
|
set undofile
|
|
|
|
set undodir=$vimdir/undo
|
|
|
|
set undolevels=1000
|
|
|
|
set undoreload=10000
|
|
|
|
|
|
|
|
" spell file
|
|
|
|
set spellfile=$vimdir/spell/en.utf-8.add
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" more sane search settings
|
2017-12-21 12:19:25 -06:00
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
set incsearch
|
|
|
|
set wrapscan
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" highlight search matches
|
|
|
|
set hlsearch
|
|
|
|
|
|
|
|
" enable syntax folding
|
2017-12-21 12:19:25 -06:00
|
|
|
set foldmethod=syntax
|
|
|
|
set foldlevel=99
|
|
|
|
set foldnestmax=10
|
2019-02-04 10:16:08 -06:00
|
|
|
set foldlevelstart=99
|
2017-12-21 12:19:25 -06:00
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
set noautowrite " let me do the writing
|
|
|
|
set autochdir " `:e` all day
|
|
|
|
set autoread " this is fine with `u`
|
|
|
|
set nomodeline " airline wins
|
|
|
|
set noshowmode " airline is really good
|
|
|
|
set noshowcmd " be clean
|
2017-12-21 12:19:25 -06:00
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
set laststatus=0 " be clean
|
2017-12-21 12:19:25 -06:00
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
" yank to OS clipboard by default
|
2018-11-08 07:32:36 -06:00
|
|
|
set clipboard+=unnamedplus
|
2017-12-21 12:19:25 -06:00
|
|
|
|
|
|
|
" no empty buffer on startup
|
2018-07-13 12:08:08 -05:00
|
|
|
augroup DisableEmptyBuffer
|
|
|
|
autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif
|
|
|
|
augroup END
|
2017-12-21 12:19:25 -06:00
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" modify higlight colors
|
|
|
|
hi Search cterm=NONE ctermbg=blue ctermfg=black
|
|
|
|
highlight LineNr ctermbg=none ctermfg=8
|
|
|
|
highlight CursorLineNr ctermbg=18 ctermfg=gray
|
|
|
|
hi IndentGuidesEven ctermbg=18
|
2019-08-08 16:45:42 -05:00
|
|
|
|
|
|
|
hi Normal ctermbg=NONE
|
2019-09-26 12:04:23 -05:00
|
|
|
|
|
|
|
" lsp config
|
|
|
|
|
|
|
|
" ale
|
|
|
|
|
|
|
|
" set completeopt=noinsert,menuone,noselect,longest,preview
|
|
|
|
|
|
|
|
" coc
|
|
|
|
|
|
|
|
|