2018-07-13 12:08:08 -05:00
|
|
|
|
scriptencoding utf8
|
|
|
|
|
|
2018-11-01 22:44:07 -05:00
|
|
|
|
let g:airline_powerline_fonts = 1
|
|
|
|
|
let g:airline#extensions#tabline#enabled = 1 " automatically displays all buffers when there's only one tab open
|
|
|
|
|
let g:airline#extensions#tabline#fnamemod = ':t'
|
|
|
|
|
" set laststatus=2 " always show statusline
|
|
|
|
|
" set noshowmode " hides default mode
|
2019-02-04 01:43:53 -06:00
|
|
|
|
|
|
|
|
|
" cleanup/simplify airline
|
2018-11-01 22:44:07 -05:00
|
|
|
|
let g:airline#extensions#tabline#left_sep = ''
|
|
|
|
|
let g:airline#extensions#tabline#left_alt_sep = ''
|
|
|
|
|
let g:airline_right_alt_sep = ''
|
|
|
|
|
let g:airline_right_sep = ''
|
|
|
|
|
let g:airline_left_alt_sep= ''
|
|
|
|
|
let g:airline_left_sep = ''
|
|
|
|
|
let g:airline#extensions#tabline#buffers_label = ''
|
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
|
" short mode texts
|
2018-11-01 22:44:07 -05:00
|
|
|
|
let g:airline_mode_map = {
|
2018-11-08 07:32:36 -06:00
|
|
|
|
\ '__' : '-',
|
|
|
|
|
\ 'n' : 'N',
|
|
|
|
|
\ 'i' : 'I',
|
|
|
|
|
\ 'R' : 'R',
|
2019-02-04 01:43:53 -06:00
|
|
|
|
\ 'T' : 'T',
|
|
|
|
|
\ 't' : 'T',
|
2018-11-08 07:32:36 -06:00
|
|
|
|
\ 'c' : 'C',
|
|
|
|
|
\ 'v' : 'V',
|
|
|
|
|
\ 'V' : 'V',
|
|
|
|
|
\ '' : 'V',
|
|
|
|
|
\ 's' : 'S',
|
|
|
|
|
\ 'S' : 'S',
|
|
|
|
|
\ '' : 'S',
|
|
|
|
|
\ }
|
2018-11-01 22:44:07 -05:00
|
|
|
|
|
|
|
|
|
let g:indent_guide_auto_colors = 1
|
|
|
|
|
let g:indent_guides_enable_on_vim_startup = 1
|
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
|
" no ALE gutter
|
2018-11-01 22:44:07 -05:00
|
|
|
|
let g:ale_sign_column_always = 0
|
|
|
|
|
let g:ale_set_signs = 0
|
|
|
|
|
highlight clear ALEErrorSign
|
|
|
|
|
highlight clear ALEWarningSign
|
|
|
|
|
|
|
|
|
|
let g:fzf_layout = { 'window': 'enew' }
|
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
|
" ALE completeopt recommendation
|
|
|
|
|
set completeopt=menu,menuone,preview,noselect,noinsert
|
|
|
|
|
" set completeopt=noinsert,menuone,noselect,longest,preview
|
2018-11-01 11:06:55 -05:00
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
|
" fix neovim cursor
|
|
|
|
|
let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 1
|
|
|
|
|
|
2019-02-04 01:43:53 -06:00
|
|
|
|
" fix me, baby
|
2018-07-13 12:08:08 -05:00
|
|
|
|
let g:ale_fix_on_save = 1
|
|
|
|
|
|
|
|
|
|
" 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
|
|
|
|
|
set ttimeoutlen=200 " ms for key combo mapping timeout
|
|
|
|
|
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')
|
2018-07-13 12:08:08 -05:00
|
|
|
|
augroup DisableVisualVell
|
|
|
|
|
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
|
2017-12-21 12:19:25 -06:00
|
|
|
|
let base16colorspace=256
|
|
|
|
|
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-02-04 01:43:53 -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
|
|
|
|
|
set foldlevelstart=0
|
|
|
|
|
|
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
|