vim and nvim config refactor / update
This commit is contained in:
parent
a5827a87a2
commit
aeb129a621
3 changed files with 81 additions and 121 deletions
108
vimplugrc
108
vimplugrc
|
@ -1,49 +1,11 @@
|
|||
" support my own way of using plugins in vim / bash
|
||||
vim9script
|
||||
autocmd BufRead *vimplugrc set ft=vim
|
||||
|
||||
let theme = 'gruvbox8'
|
||||
let themebg = 'dark'
|
||||
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()
|
||||
let g:gruvbox_transp_bg = 1
|
||||
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_italics = 1
|
||||
let g:solarized_extra_hi_groups = 1
|
||||
let g:solarized_termtrans = 1
|
||||
let g:solarized_termcolors = 16
|
||||
endif
|
||||
|
||||
" enable plugins
|
||||
execute 'source' fnameescape(plug)
|
||||
silent!call plug#begin(plugdir)
|
||||
|
||||
" plugin manager for self updates
|
||||
execute 'source' fnameescape(g:plug)
|
||||
plug#begin(g:plugdir)
|
||||
Plug 'junegunn/vim-plug'
|
||||
Plug 'lifepillar/vim-gruvbox8'
|
||||
|
||||
" general plugins
|
||||
"Plug 'sheerun/vim-polyglot'
|
||||
Plug 'hashivim/vim-terraform'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'junegunn/fzf'
|
||||
|
@ -55,49 +17,43 @@ Plug 'tpope/vim-fugitive'
|
|||
Plug 'tpope/vim-rsi'
|
||||
Plug 'tpope/vim-vinegar'
|
||||
Plug 'w0rp/ale', {'for': ['sh']}
|
||||
Plug 'vimwiki/vimwiki', {'on': 'VimwikiIndex'}
|
||||
plug#end()
|
||||
|
||||
" themes
|
||||
Plug 'lifepillar/vim-gruvbox8'
|
||||
Plug 'lifepillar/vim-solarized8'
|
||||
Plug 'NLKNguyen/papercolor-theme'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" easy-align
|
||||
# easy-align
|
||||
xmap <Leader>a <Plug>(EasyAlign)
|
||||
nmap <Leader>a <Plug>(EasyAlign)
|
||||
|
||||
" fzf
|
||||
# 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>
|
||||
|
||||
" vimwiki
|
||||
let g:vimwiki_list = [{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
|
||||
# lightline
|
||||
g:lightline = {
|
||||
colorscheme: 'gruvbox8',
|
||||
separator: { left: "\ue0b0", right: "\ue0b2"},
|
||||
subseparator: { left: "\ue0b1", right: "\ue0b3"}
|
||||
}
|
||||
|
||||
" lightline
|
||||
let g:lightline = {
|
||||
\ 'separator': {'left': "\ue0b0", 'right': "\ue0b2"},
|
||||
\ 'subseparator': {'left': "\ue0b1", 'right': "\ue0b3"}
|
||||
\ }
|
||||
let g:lightline['colorscheme'] = printf(lightline_theme)
|
||||
|
||||
if $TERM !~ '^linux'
|
||||
if $TERM == 'xterm-256color'
|
||||
set term=xterm-direct
|
||||
endif
|
||||
if has('gui_running')
|
||||
set guifont=Cascadia\ Code\ PL:h16
|
||||
set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor
|
||||
set guiheadroom=0 guioptions=aei mouse=a
|
||||
|
||||
map <S-Insert> <MiddleMouse>
|
||||
map! <S-Insert> <MiddleMouse>
|
||||
endif
|
||||
|
||||
let &bg = printf(themebg)
|
||||
execute printf('colorscheme %s', theme)
|
||||
if $TERM == 'xterm-256color'
|
||||
set term=xterm-direct
|
||||
endif
|
||||
|
||||
g:gruvbox_transp_bg = 1
|
||||
g:gruvbox_plugin_hi_groups = 1
|
||||
g:gruvbox_filetype_hi_groups = 1
|
||||
&t_8f = "\u1b[38;2;%lu;%lu;%lum"
|
||||
&t_8b = "\u1b[48;2;%lu;%lu;%lum"
|
||||
&tgc = 1
|
||||
&bg = 'dark'
|
||||
colorscheme gruvbox8
|
||||
|
||||
if has('gui_running')
|
||||
set guifont=JetBrains\ Mono:h14
|
||||
set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor
|
||||
set guiheadroom=0 guioptions=aei mouse=a
|
||||
map <S-Insert> <MiddleMouse>
|
||||
map! <S-Insert> <MiddleMouse>
|
||||
endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue