2019-11-11 15:08:59 +02:00
|
|
|
" support my own way of using plugins in vim / bash
|
|
|
|
autocmd BufRead *vimplugrc set ft=vim
|
2022-04-11 18:20:36 +03:00
|
|
|
|
2022-07-21 19:13:40 +03:00
|
|
|
let theme = 'gruvbox8'
|
|
|
|
let themebg = 'dark'
|
2022-04-11 18:20:36 +03:00
|
|
|
let lightline_theme = printf(theme)
|
|
|
|
|
|
|
|
function EnableTGC()
|
|
|
|
let &t_8f = "\u1b[38;2;%lu;%lu;%lum"
|
|
|
|
let &t_8b = "\u1b[48;2;%lu;%lu;%lum"
|
|
|
|
let &tgc = 1
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
if theme == 'PaperColor'
|
|
|
|
let g:PaperColor_Theme_Options = {'theme': {
|
|
|
|
\ 'default.dark': {'allow_bold': 1, 'allow_italic': 1},
|
|
|
|
\ 'default.light': {'allow_bold': 1, 'allow_italic': 1}
|
|
|
|
\ }}
|
|
|
|
endif
|
|
|
|
|
|
|
|
if theme == 'gruvbox8'
|
|
|
|
call EnableTGC()
|
2022-07-30 15:48:35 +03:00
|
|
|
let themebg = 'dark'
|
|
|
|
|
|
|
|
let g:gruvbox_transp_bg = 1
|
2022-04-11 18:20:36 +03:00
|
|
|
let g:gruvbox_plugin_hi_groups = 1
|
|
|
|
let g:gruvbox_filetype_hi_groups = 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
if theme == 'solarized8'
|
|
|
|
let lightline_theme = 'solarized'
|
|
|
|
|
|
|
|
let g:solarized_use16 = 1
|
|
|
|
let g:solarized_extra_hi_groups = 1
|
|
|
|
let g:solarized_termcolors = 16
|
|
|
|
endif
|
|
|
|
|
2019-11-11 15:08:59 +02:00
|
|
|
" enable plugins
|
2019-11-15 18:39:48 +02:00
|
|
|
execute 'source' fnameescape(plug)
|
2019-11-11 15:08:59 +02:00
|
|
|
silent!call plug#begin(plugdir)
|
|
|
|
|
|
|
|
" plugin manager for self updates
|
|
|
|
Plug 'junegunn/vim-plug'
|
|
|
|
|
|
|
|
" general plugins
|
2021-02-10 20:52:02 +02:00
|
|
|
"Plug 'sheerun/vim-polyglot'
|
2021-06-23 19:52:39 +03:00
|
|
|
Plug 'itchyny/lightline.vim'
|
2019-11-11 16:26:30 +02:00
|
|
|
Plug 'junegunn/fzf.vim'
|
2019-11-11 15:08:59 +02:00
|
|
|
Plug 'junegunn/vim-easy-align'
|
|
|
|
Plug 'mhinz/vim-signify'
|
|
|
|
Plug 'tpope/vim-commentary'
|
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
Plug 'tpope/vim-rsi'
|
2019-11-11 16:26:30 +02:00
|
|
|
Plug 'tpope/vim-vinegar'
|
2021-02-10 20:52:02 +02:00
|
|
|
Plug 'w0rp/ale', {'for': ['sh']}
|
2019-11-11 15:08:59 +02:00
|
|
|
Plug 'vimwiki/vimwiki', {'on': 'VimwikiIndex'}
|
|
|
|
|
2021-07-14 23:18:26 +03:00
|
|
|
" themes
|
|
|
|
Plug 'lifepillar/vim-gruvbox8'
|
|
|
|
Plug 'lifepillar/vim-solarized8'
|
|
|
|
Plug 'NLKNguyen/papercolor-theme'
|
|
|
|
|
2019-11-11 15:08:59 +02:00
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
" easy-align
|
|
|
|
xmap <Leader>a <Plug>(EasyAlign)
|
|
|
|
nmap <Leader>a <Plug>(EasyAlign)
|
|
|
|
|
2019-11-11 16:26:30 +02:00
|
|
|
" fzf
|
|
|
|
nmap <Leader>ff :Files<CR>
|
|
|
|
nmap <Leader>fg :GFiles<CR>
|
|
|
|
nmap <Leader>fb :Buffers<CR>
|
|
|
|
nmap <Leader>fl :Lines<CR>
|
|
|
|
nmap <Leader>ft :Filetypes<CR>
|
|
|
|
|
2022-04-11 18:20:36 +03:00
|
|
|
" vimwiki
|
2019-11-11 15:08:59 +02:00
|
|
|
let g:vimwiki_list = [{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
|
|
|
|
|
2022-04-11 18:20:36 +03:00
|
|
|
" lightline
|
2022-07-30 15:48:35 +03:00
|
|
|
let g:lightline = {
|
|
|
|
\ 'separator': {'left': "\ue0b0", 'right': "\ue0b2"},
|
|
|
|
\ 'subseparator': {'left': "\ue0b1", 'right': "\ue0b3"}
|
|
|
|
\ }
|
2022-04-11 18:20:36 +03:00
|
|
|
let g:lightline['colorscheme'] = printf(lightline_theme)
|
|
|
|
|
2021-06-23 19:52:39 +03:00
|
|
|
if $TERM !~ '^linux'
|
|
|
|
if has('gui_running')
|
2022-07-30 15:48:35 +03:00
|
|
|
set guifont=Cascadia\ Code\ PL:h16
|
2021-06-23 19:52:39 +03:00
|
|
|
set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor
|
2021-07-15 03:47:01 +03:00
|
|
|
set guiheadroom=0 guioptions=aei mouse=a
|
2021-06-23 19:52:39 +03:00
|
|
|
|
|
|
|
map <S-Insert> <MiddleMouse>
|
|
|
|
map! <S-Insert> <MiddleMouse>
|
|
|
|
endif
|
2021-02-10 20:52:02 +02:00
|
|
|
|
2022-04-11 18:20:36 +03:00
|
|
|
let &bg = printf(themebg)
|
|
|
|
execute printf('colorscheme %s', theme)
|
2019-11-11 15:08:59 +02:00
|
|
|
endif
|