2016-10-17 05:46:09 -04:00
|
|
|
set encoding=utf-8
|
|
|
|
scriptencoding utf-8
|
|
|
|
|
2018-01-11 20:13:02 -05:00
|
|
|
function! s:ensure_dir(dir)
|
2017-09-10 19:32:55 -04:00
|
|
|
if filewritable(a:dir) != 2
|
|
|
|
call mkdir(a:dir, "p", 0700)
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
|
2018-01-11 20:40:47 -05:00
|
|
|
" These are really clever - minpac will actually be loaded on the fly only
|
|
|
|
" when you need to update or clean your packages, rather than all the time.
|
2018-01-11 20:23:27 -05:00
|
|
|
command! PackUpdate source $XDG_CONFIG_HOME/vim/plugins.vim | call minpac#update()
|
|
|
|
command! PackClean source $XDG_CONFIG_HOME/vim/plugins.vim | call minpac#clean()
|
2018-01-11 20:00:06 -05:00
|
|
|
|
2018-01-11 20:40:47 -05:00
|
|
|
" If the pack directory doesn't exist, we haven't installed any packages yet,
|
|
|
|
" so let's call PackUpdate.
|
|
|
|
if !isdirectory($XDG_CACHE_HOME . '/vim/pack')
|
2018-01-11 20:23:27 -05:00
|
|
|
PackUpdate
|
2016-10-22 06:10:08 -04:00
|
|
|
endif
|
2016-10-05 19:56:05 -04:00
|
|
|
|
2018-01-11 20:40:47 -05:00
|
|
|
" Use Inkpot, since it's gorgeous, but with a transparent background instead
|
|
|
|
" of a solid black one.
|
2018-01-11 20:00:06 -05:00
|
|
|
augroup transparent_term
|
|
|
|
autocmd!
|
|
|
|
autocmd ColorScheme * highlight Normal ctermbg=NONE
|
|
|
|
augroup END
|
2018-01-11 20:23:27 -05:00
|
|
|
silent! colorscheme inkpot
|
2016-10-22 06:10:08 -04:00
|
|
|
|
2016-10-05 19:56:05 -04:00
|
|
|
inoremap jj <Esc>
|
2016-10-22 06:10:08 -04:00
|
|
|
nnoremap <C-t> :Files<CR>
|
2016-10-05 19:56:05 -04:00
|
|
|
|
|
|
|
set linebreak showbreak=↩
|
|
|
|
set showcmd
|
2016-10-17 05:45:30 -04:00
|
|
|
set wildmode=longest,full
|
2016-10-05 19:56:05 -04:00
|
|
|
|
2016-10-22 06:10:08 -04:00
|
|
|
set tabstop=2 shiftwidth=2
|
|
|
|
|
|
|
|
if exists('+breakindent')
|
|
|
|
set breakindent breakindentopt=sbr
|
|
|
|
endif
|
|
|
|
|
2016-10-05 19:56:05 -04:00
|
|
|
if exists('+relativenumber')
|
|
|
|
set relativenumber
|
|
|
|
else
|
|
|
|
set number
|
|
|
|
endif
|
|
|
|
|
2017-09-10 19:32:55 -04:00
|
|
|
for s:dir in ['backup', 'swap', 'undo']
|
|
|
|
call s:ensure_dir($XDG_CACHE_HOME . '/vim/' . s:dir)
|
|
|
|
endfor
|
|
|
|
|
|
|
|
set backupdir=.,$XDG_CACHE_HOME/vim/backup
|
|
|
|
set directory=.,$XDG_CACHE_HOME/vim/swap
|
2016-11-15 18:17:55 -05:00
|
|
|
if exists('+undofile')
|
|
|
|
set undofile
|
2017-09-10 19:32:55 -04:00
|
|
|
set undodir=$XDG_CACHE_HOME/vim/undo
|
2016-11-15 18:17:55 -05:00
|
|
|
endif
|
|
|
|
|
2016-11-15 18:17:12 -05:00
|
|
|
let g:airline_powerline_fonts = 1
|
2016-10-22 06:10:08 -04:00
|
|
|
let g:LatexBox_Folding = 1
|
2016-10-30 07:14:56 -04:00
|
|
|
let g:NERDTreeHijackNetrw = 1
|