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-02-13 01:02:08 -05:00
|
|
|
if exists('+packpath')
|
|
|
|
" 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.
|
2020-09-03 00:01:05 -04:00
|
|
|
command! PackUpdate source $XDG_CONFIG_HOME/vim/plugins.vim | call minpac#update()
|
2018-02-13 01:02:08 -05:00
|
|
|
command! PackClean source $XDG_CONFIG_HOME/vim/plugins.vim | call minpac#clean()
|
2020-06-13 05:36:24 -04:00
|
|
|
command! PackStatus source $XDG_CONFIG_HOME/vim/plugins.vim | call minpac#status()
|
2018-01-11 20:00:06 -05:00
|
|
|
|
2018-02-13 01:02:08 -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')
|
|
|
|
PackUpdate
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
" If we're on a version of Vim that doesn't have packages, we have to load a
|
|
|
|
" plugin manager (vim-plug) on every boot.
|
|
|
|
source $XDG_CONFIG_HOME/vim/plugins.vim
|
2016-10-22 06:10:08 -04:00
|
|
|
endif
|
2016-10-05 19:56:05 -04:00
|
|
|
|
2018-01-11 20:00:06 -05:00
|
|
|
augroup transparent_term
|
|
|
|
autocmd!
|
2018-01-24 20:07:05 -05:00
|
|
|
autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE
|
2018-01-11 20:00:06 -05:00
|
|
|
augroup END
|
2018-01-24 20:07:05 -05:00
|
|
|
set background=dark
|
|
|
|
let g:gruvbox_italic=1
|
|
|
|
let g:gruvbox_improved_strings=1
|
|
|
|
let g:gruvbox_improved_warnings=1
|
|
|
|
|
2018-06-17 20:43:11 -04:00
|
|
|
if has('gui_running') || has('termguicolors')
|
2018-01-24 20:07:05 -05:00
|
|
|
set termguicolors
|
2018-02-13 01:02:08 -05:00
|
|
|
silent! packadd gruvbox
|
2018-01-24 20:07:05 -05:00
|
|
|
let g:airline_theme = 'gruvbox'
|
|
|
|
colorscheme gruvbox
|
|
|
|
else
|
|
|
|
colorscheme inkpot
|
|
|
|
endif
|
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
|
|
|
|
2018-04-18 19:34:43 -04:00
|
|
|
|
2018-02-21 18:44:43 -05:00
|
|
|
if exists('+belloff')
|
|
|
|
set belloff+=ctrlg
|
|
|
|
endif
|
|
|
|
|
2018-01-24 01:13:17 -05:00
|
|
|
set completeopt+=menuone
|
|
|
|
|
2016-10-05 19:56:05 -04:00
|
|
|
set linebreak showbreak=↩
|
2021-04-26 01:11:12 -04:00
|
|
|
set modelines=5
|
2016-10-05 19:56:05 -04:00
|
|
|
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']
|
2021-09-21 20:35:51 -04:00
|
|
|
call s:ensure_dir($XDG_STATE_HOME . '/vim/' . s:dir)
|
2017-09-10 19:32:55 -04:00
|
|
|
endfor
|
|
|
|
|
2021-09-21 20:35:51 -04:00
|
|
|
set backupdir=.,$XDG_STATE_HOME/vim/backup
|
|
|
|
set directory=.,$XDG_STATE_HOME/vim/swap
|
2016-11-15 18:17:55 -05:00
|
|
|
if exists('+undofile')
|
|
|
|
set undofile
|
2021-09-21 20:35:51 -04:00
|
|
|
set undodir=$XDG_STATE_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
|
2020-09-18 01:52:49 -04:00
|
|
|
let g:airline#extensions#battery#enabled = 1
|
|
|
|
|
2022-02-23 17:10:54 -05:00
|
|
|
let g:csv_no_conceal = 1
|
|
|
|
|
2022-05-15 21:27:36 -04:00
|
|
|
let vim_svelte_plugin_use_typescript = 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
|
2018-04-18 19:34:43 -04:00
|
|
|
|
2019-11-07 17:01:55 -05:00
|
|
|
let g:ale_set_balloons = 1
|
|
|
|
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
|
|
|
|
nmap <silent> <C-j> <Plug>(ale_next_wrap)
|
|
|
|
|
2018-04-18 19:34:43 -04:00
|
|
|
let g:mucomplete#can_complete = {
|
|
|
|
\'default': {
|
|
|
|
\'omni': {t -> strlen(&l:omnifunc) > 0 && t =~# '\m\k\%(\k\|\.\)$'}
|
|
|
|
\}
|
|
|
|
\}
|