Skip to content

Instantly share code, notes, and snippets.

@nauvalazhar
Last active August 27, 2022 07:51
Show Gist options
  • Save nauvalazhar/ae0d12aa8a00e24a238fba73e536a8c8 to your computer and use it in GitHub Desktop.
Save nauvalazhar/ae0d12aa8a00e24a238fba73e536a8c8 to your computer and use it in GitHub Desktop.
my vimrc + pop_punk.vim + tmux onedark
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'ayu-theme/ayu-vim'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/vim-easy-align'
Plug 'mg979/vim-visual-multi'
Plug 'dracula/vim', { 'name': 'dracula' }
Plug 'bignimbus/pop-punk.vim'
Plug 'agude/vim-eldar'
Plug 'yuezk/vim-js'
Plug 'maxmellon/vim-jsx-pretty'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'mhinz/vim-startify'
Plug 'ryanoasis/vim-devicons'
Plug 'jwalton512/vim-blade'
Plug 'arcticicestudio/nord-vim'
Plug 'vim-ctrlspace/vim-ctrlspace'
Plug 'mattn/emmet-vim'
call plug#end()
imap jj <Esc>
let g:startify_custom_header = [
\ ' _ _ ',
\ ' | | ____ _ _ __ ___| |_ ___ _ __ ',
\ ' | |/ / _` | ''__/ __| __/ _ \ ''_ \ ',
\ ' | < (_| | | \__ \ || __/ | | | ',
\ ' |_|\_\__,_|_| |___/\__\___|_| |_| ',
\ '',
\ '',
\ ]
let g:startify_lists = [
\ { 'type': 'sessions', 'header': [' Sessions'] },
\ { 'type': 'files', 'header': [' MRU'] },
\ { 'type': 'dir', 'header': [' MRU '. getcwd()] },
\ { 'type': 'bookmarks', 'header': [' Bookmarks'] },
\ { 'type': 'commands', 'header': [' Commands'] },
\ ]
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
let $FZF_DEFAULT_OPTS="--ansi --color=bg+:#0F1419,fg+:#17D262,pointer:#17D262,hl:#D21771,hl+:#D21771,info:#3d4651 --pointer '👉' --preview-window 'right:60%' --layout reverse --margin=2% --border --no-info --preview 'bat --color=always --style=header,grid --line-range :300 {}'"
let g:fzf_action = {
\ 'enter': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
let loaded_netrwPlugin = 1
let g:indentLine_char = '▏'
let g:indentLine_enabled = 0
let g:indentLine_color_term = 239
"let g:indentLine_char_list = ['|', '¦', '┆', '┊']
let g:airline_theme='pop_punk'
let g:airline#extensions#whitespace#enabled = 0
let g:airline#extensions#battery#enabled = 1
let g:airline#extensions#capslock#enabled = 1
let g:airline#extensions#capslock#symbol = 'CAPS'
let g:airline#extensions#coc#enabled = 1
let g:airline#extensions#tabline#show_buffers = 1
let g:airline#extensions#tabline#show_tab_nr =1
let g:airline#extensions#tabline#show_tab_count = 0
let g:airline#extensions#tabline#show_splits = 0
" let g:airline#extensions#tabline#enabled = 1
" let g:airline#extensions#tabline#buffer_min_count = 0
" let g:airline#extensions#tabline#show_splits = 0
let g:airline#extensions#tabline#show_close_button = 0
let g:airline_stl_path_style = 'short'
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline_powerline_fonts = 1
let NERDTreeMinimalUI=1
let NERDTreeStatusline="%{matchstr(getline('.'), '\\s\\zs\\w\\(.*\\)')}"
let g:NERDTreeWinSize=25
let NERDTreeDirArrowExpandable = "\u00a0"
let NERDTreeDirArrowCollapsible = "\u00a0"
let g:airline_statusline_ontop= 0
" pop-punk ANSI colors for vim terminal
" let g:terminal_ansi_colors = pop_punk#AnsiColors()
" for the airline theme - note the underscore instead of the hyphen
" just for fun
let g:airline_section_c = '🐨 %F'
let g:user_emmet_settings = {
\ 'javascript' : {
\ 'extends' : 'jsx',
\ },
\}
" auto open nerdtree
" autocmd VimEnter * NERDTree
" autocmd BufWinEnter * NERDTreeMirror
augroup nerdtreehidecwd
autocmd!
autocmd FileType nerdtree setlocal conceallevel=3 | syntax match NERDTreeDirSlash #/$# containedin=NERDTreeDir conceal contained
augroup end
set clipboard=unnamedplus
" set term=xterm-256color
set textwidth=0
set noswapfile
set wrapmargin=0
set wrap!
" set cursorline
set fillchars+=vert:\
set encoding=UTF-8
set tabstop=4
set expandtab
set shiftwidth=4
set softtabstop=4
set autoindent
set number
set termguicolors
set nocompatible
set hidden
set fillchars=vert:\│
" colorscheme pop-punk
colorscheme pop-punk
hi NonText guifg=bg
hi TabLineFill guifg=#131920
hi TabLine gui=NONE guibg=#131920 guifg=#E6E1CF cterm=NONE term=NONE
hi TabLineSel gui=NONE guibg=#0F1419 ctermbg=Yellow
hi Normal guibg=#0F1419
hi VertSplit guifg=#131920 gui=NONE
hi LineNr guibg=#0F1419
hi Error guibg=#0F1419
hi WarningMsg guibg=#0F1419
" hi CursorLine guibg=#111111
" hi! EndOfBuffer ctermbg=bg ctermfg=bg guibg=bg guifg=bg
inoremap <C-v> <ESC>"+pa
vnoremap <C-c> "+y
vnoremap <C-d> "+d
nmap ,n :NERDTreeFind<CR>
nmap ,m :NERDTreeToggle<CR>
noremap <C-p> :Files<CR>
vnoremap > >gv
vnoremap < <gv
noremap <C-K> @:<CR>
nnoremap <C-H> :tabprevious<CR>
nnoremap <C-L> :tabnext<CR>
" TextEdit might fail if hidden is not set.
set hidden
" Some servers have issues with backup files, see #649.
set nobackup
set nowritebackup
" Give more space for displaying messages.
set cmdheight=1
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
" Don't pass messages to |ins-completion-menu|.
set shortmess+=c
" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
" Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
" Coc only does snippet and additional edit on confirm.
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" autoload/airline/themes/pop_punk.vim
" Pop-Punk Airline theme
" for use with the Pop-Punk color scheme
"
" by Jeff Auriemma
" @bignimbus
let s:colors = pop_punk#GetColors()
" Normal Mode
" ---------- fgcolor bgcolor fg bg
let s:N1 = [ '#ffffff' , '#480BC9' , s:colors.white[1] , s:colors.magenta[1] ]
let s:N2 = [ '#ffffff' , '#1d242d' , s:colors.pink[1] , s:colors.gray_2[1] ]
let s:N3 = [ '#ffffff' , '#0F1419' , s:colors.gray_7[1] , s:colors.black[1] ]
" Insert Mode
let s:I1 = [ '#ffffff' , '#D21771' , s:colors.white[1] , s:colors.blue[1] ]
let s:I2 = [ '#ffffff' , '#1d242d' , s:colors.pink[1] , s:colors.gray_2[1] ]
let s:I3 = [ '#ffffff' , '#0F1419' , s:colors.gray_7[1] , s:colors.black[1] ]
" Visual Mode
let s:V1 = [ '#ffffff' , '#174BD2' , s:colors.black[1] , s:colors.orange[1] ]
let s:V2 = [ '#ffffff' , '#1d242d' , s:colors.pink[1] , s:colors.gray_2[1] ]
let s:V3 = [ '#ffffff' , '#0F1419' , s:colors.gray_7[1] , s:colors.black[1] ]
" Replace Mode
let s:R1 = [ '#ffffff' , '#0ACB4C' , s:colors.black[1] , s:colors.yellow[1] ]
let s:R2 = [ '#ffffff' , '#1d242d' , s:colors.pink[1] , s:colors.gray_2[1] ]
let s:R3 = [ '#ffffff' , '#0F1419' , s:colors.gray_7[1] , s:colors.black[1] ]
" Inactive Mode
let s:IA1 = [ s:colors.white[0] , '#131920' , s:colors.white[1] , s:colors.magenta[1] ]
let s:IA2 = [ '#ffffff' , '#1d242d' , s:colors.pink[1] , s:colors.gray_2[1] ]
let s:IA3 = [ '#ffffff' , '#0F1419' , s:colors.gray_7[1] , s:colors.black[1] ]
" Terminal Mode
let s:T1 = [ s:colors.white[0] , s:colors.magenta[0] , s:colors.white[1] , s:colors.magenta[1] ]
let s:T2 = [ s:colors.pink[0] , s:colors.gray_2[0] , s:colors.pink[1] , s:colors.gray_2[1] ]
let s:T3 = [ '#ffffff' , s:colors.black[0] , s:colors.gray_7[1] , s:colors.black[1] ]
let g:airline#themes#pop_punk#palette = {}
let g:airline#themes#pop_punk#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#pop_punk#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#pop_punk#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#pop_punk#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let g:airline#themes#pop_punk#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
let g:airline#themes#pop_punk#palette.terminal = airline#themes#generate_color_map(s:T1, s:T2, s:T3)
" Warning Mode
let s:WI = [ '#ffffff' , '#EBB62E' , s:colors.yellow[1] , s:colors.gray_2[1] , 'bold' ]
let g:airline#themes#pop_punk#palette.normal.airline_warning = [
\ s:WI[0], s:WI[1], s:WI[2], s:WI[3], s:WI[4]
\ ]
let g:airline#themes#pop_punk#palette.insert.airline_warning = g:airline#themes#pop_punk#palette.normal.airline_warning
let g:airline#themes#pop_punk#palette.visual.airline_warning = g:airline#themes#pop_punk#palette.normal.airline_warning
let g:airline#themes#pop_punk#palette.replace.airline_warning = g:airline#themes#pop_punk#palette.normal.airline_warning
let g:airline#themes#pop_punk#palette.terminal.airline_warning = g:airline#themes#pop_punk#palette.normal.airline_warning
" Error Mode
let s:ER = [ '#ffffff' , '#D21771' , s:colors.red_2[1] , s:colors.gray_2[1] , 'bold' ]
let g:airline#themes#pop_punk#palette.normal.airline_error = [
\ s:ER[0], s:ER[1], s:ER[2], s:ER[3], s:ER[4]
\ ]
let g:airline#themes#pop_punk#palette.insert.airline_error = g:airline#themes#pop_punk#palette.normal.airline_error
let g:airline#themes#pop_punk#palette.visual.airline_error = g:airline#themes#pop_punk#palette.normal.airline_error
let g:airline#themes#pop_punk#palette.replace.airline_error = g:airline#themes#pop_punk#palette.normal.airline_error
let g:airline#themes#pop_punk#palette.terminal.airline_error = g:airline#themes#pop_punk#palette.normal.airline_error
" Terminal
let s:TE = [ '#ffffff' , '#0F1419' , s:colors.gray_7[1] , s:colors.black[1] , '' ]
let g:airline#themes#pop_punk#palette.normal.airline_term = [
\ s:TE[0], s:TE[1], s:TE[2], s:TE[3], s:TE[4]
\ ]
let g:airline#themes#pop_punk#palette.insert.airline_term = g:airline#themes#pop_punk#palette.normal.airline_term
let g:airline#themes#pop_punk#palette.visual.airline_term = g:airline#themes#pop_punk#palette.normal.airline_term
let g:airline#themes#pop_punk#palette.replace.airline_term = g:airline#themes#pop_punk#palette.normal.airline_term
let g:airline#themes#pop_punk#palette.terminal.airline_term = g:airline#themes#pop_punk#palette.normal.airline_term
" autoload/pop_punk.vim
let s:colors = {}
let s:colors.white = ['#ffffff', 231]
let s:colors.gray_1 = ['#1a1a1a', 234]
let s:colors.gray_2 = ['#2e373e', 237]
let s:colors.gray_3 = ['#3a3a3a', 237]
let s:colors.gray_4 = ['#5a5a5a', 59]
let s:colors.gray_5 = ['#767c88', 60]
let s:colors.gray_6 = ['#8b8a7c', 101]
let s:colors.gray_7 = ['#8787af', 103]
let s:colors.black = ['#000000', 16]
let s:colors.eggshell = ['#ffffcd', 230]
let s:colors.mauve = ['#e4dfff', 189]
let s:colors.blue = ['#0088ff', 33]
let s:colors.teal = ['#40e0d0', 80]
let s:colors.magenta = ['#c526ff', 165]
let s:colors.burgundy = ['#5f2a5f', 53]
let s:colors.red_1 = ['#d70061', 161]
let s:colors.red_2 = ['#ff005f', 197]
let s:colors.orange = ['#ff9d00', 214]
let s:colors.sun = ['#ffdd00', 220]
let s:colors.yellow = ['#ffff00', 226]
let s:colors.pink = ['#f9e0f5', 225]
let s:colors.green = ['#5ff967', 76]
let s:colors.cobalt_1 = ['#306b8f', 24]
let s:colors.cobalt_2 = ['#445291', 60]
function! pop_punk#GetColors()
return s:colors
endfunction
function! pop_punk#AnsiColors()
return [
\s:colors.black[0],
\s:colors.red_2[0],
\s:colors.green[0],
\s:colors.orange[0],
\s:colors.blue[0],
\s:colors.magenta[0],
\s:colors.teal[0],
\s:colors.white[0],
\s:colors.gray_7[0],
\s:colors.red_2[0],
\s:colors.green[0],
\s:colors.yellow[0],
\s:colors.blue[0],
\s:colors.magenta[0],
\s:colors.teal[0],
\s:colors.pink[0]
\]
endfunction
" colors/pop_punk.vim
" Pop-Punk
"
" by Jeff Auriemma
" @bignimbus
scriptencoding utf8
set t_Co=256
let &t_Cs = "\e[4:3m"
let &t_Ce = "\e[4:0m"
let g:colors_name = "pop-punk"
" Palette
let s:colors = pop_punk#GetColors()
let s:white = s:colors.white
let s:gray_1 = s:colors.gray_1
let s:gray_2 = s:colors.gray_2
let s:gray_3 = s:colors.gray_3
let s:gray_4 = s:colors.gray_4
let s:gray_5 = s:colors.gray_5
let s:gray_6 = s:colors.gray_6
let s:gray_7 = s:colors.gray_7
let s:black = s:colors.black
let s:eggshell = s:colors.eggshell
let s:mauve = s:colors.mauve
let s:blue = s:colors.blue
let s:teal = s:colors.teal
let s:magenta = s:colors.magenta
let s:burgundy = s:colors.burgundy
let s:red_1 = s:colors.red_1
let s:red_2 = s:colors.red_2
let s:orange = s:colors.orange
let s:sun = s:colors.sun
let s:yellow = s:colors.yellow
let s:pink = s:colors.pink
let s:green = s:colors.green
let s:cobalt_1 = s:colors.cobalt_1
let s:cobalt_2 = s:colors.cobalt_2
let s:none = ['NONE', 'NONE']
" User Configuration
if !exists('g:pop_punk_bold')
let g:pop_punk_bold = 1
endif
if !exists('g:pop_punk_italic')
let g:pop_punk_italic = 1
endif
if !exists('g:pop_punk_underline')
let g:pop_punk_underline = 1
endif
if !exists('g:pop_punk_undercurl') && g:pop_punk_underline != 0
let g:pop_punk_undercurl = 1
endif
if !exists('g:pop_punk_inverse')
let g:pop_punk_inverse = 1
endif
if !exists('g:pop_punk_colorterm')
let g:pop_punk_colorterm = 1
endif
" Script Helpers
let s:attrs = {
\ 'bold': g:pop_punk_bold == 1 ? 'bold' : 0,
\ 'italic': g:pop_punk_italic == 1 ? 'italic' : 0,
\ 'underline': g:pop_punk_underline == 1 ? 'underline' : 0,
\ 'undercurl': g:pop_punk_undercurl == 1 ? 'undercurl' : 0,
\ 'inverse': g:pop_punk_inverse == 1 ? 'inverse' : 0,
\}
function! s:h(scope, fg, ...) " bg, attr_list, special
let l:fg = copy(a:fg)
let l:bg = get(a:, 1, ['NONE', 'NONE'])
let l:attr_list = filter(get(a:, 2, ['NONE']), 'type(v:val) == 1')
let l:attrs = len(l:attr_list) > 0 ? join(l:attr_list, ',') : 'NONE'
let l:special = get(a:, 3, ['NONE', 'NONE'])
" Falls back to coloring foreground group on terminals because
" nearly all do not support undercurl
" if l:special[0] !=# 'NONE' && l:fg[0] ==# 'NONE' && !has('gui_running')
" let l:fg[0] = l:special[0]
" let l:fg[1] = l:special[1]
" endif
let l:hl_string = [
\ 'highlight', a:scope,
\ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1],
\ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1],
\ 'gui=' . l:attrs, 'cterm=' . l:attrs,
\ 'guisp=' . l:special[0],
\]
execute join(l:hl_string, ' ')
endfunction
" User Interface
set background=dark
" Required as some plugins will overwrite
call s:h('Normal', s:white, s:black)
call s:h('StatusLine', s:magenta, s:gray_2, [s:attrs.bold])
call s:h('StatusLineNC', s:gray_7, s:gray_2, [s:attrs.italic])
" call s:h('StatusLineTerm', s:none, s:bglighter, [s:attrs.bold])
" call s:h('StatusLineTermNC', s:none, s:bglight)
call s:h('WildMenu', s:none, s:gray_7)
call s:h('Cursor', s:black, s:mauve)
call s:h('CursorLine', s:none, s:gray_1)
call s:h('CursorColumn', s:none, s:gray_1)
call s:h('CursorLineNr', s:yellow, s:none)
call s:h('Debug', s:gray_6, s:none)
call s:h('DiffAdd', s:none, s:gray_3)
call s:h('DiffChange', s:eggshell, s:cobalt_1)
call s:h('DiffDelete', s:red_2, s:none)
" call s:h('DiffRemoved', s:red_2, s:none)
call s:h('DiffText', s:eggshell, s:burgundy)
call s:h('Directory', s:magenta, s:none)
call s:h('ErrorMsg', s:red_2, s:none)
call s:h('FoldColumn', s:gray_1, s:gray_7, [s:attrs.italic])
call s:h('Folded', s:gray_1, s:gray_7, [s:attrs.italic])
call s:h('IncSearch', s:white, s:blue)
call s:h('LineNr', s:gray_7, s:black)
call s:h('MoreMsg', s:pink, s:gray_2)
call s:h('NonText', s:gray_5, s:none)
call s:h('Pmenu', s:white, s:gray_2)
call s:h('PmenuSbar', s:none, s:gray_2)
call s:h('PmenuSel', s:white, s:red_1)
call s:h('PmenuThumb', s:none, s:cobalt_1)
call s:h('Question', s:pink, s:gray_2)
call s:h('Search', s:white, s:blue)
call s:h('SignColumn', s:gray_1, s:black)
call s:h('TabLineSel', s:white, s:magenta, [s:attrs.bold])
call s:h('Title', s:white, s:none)
call s:h('Visual', s:gray_1, s:mauve)
" call s:h('VisualNOS', s:gray_1, s:mauve)
" Syntax
" Required as some plugins will overwrite
call s:h('MatchParen', s:white, s:blue)
" call s:h('Conceal', s:cyan, s:none)
call s:h('SpecialKey', s:gray_5, s:none)
call s:h('Comment', s:blue, s:none, [s:attrs.italic])
call s:h('Underlined', s:blue, s:none, [s:attrs.underline])
call s:h('Todo', s:orange, s:black)
call s:h('Error', s:red_2, s:none)
call s:h('SpellBad', s:none, s:none, [s:attrs.undercurl], s:red_2)
" call s:h('SpellLocal', s:none, s:none, [s:attrs.undercurl], s:red_2)
call s:h('SpellCap', s:none, s:none, [s:attrs.undercurl], s:yellow)
" call s:h('SpellRare', s:none, s:none)
call s:h('Constant', s:red_2, s:none)
call s:h('String', s:green, s:none)
call s:h('Character', s:red_2, s:none)
hi! link Character Constant
hi! link Number Constant
hi! link Boolean Constant
hi! link Float Constant
call s:h('Identifier', s:teal, s:none)
call s:h('Function', s:teal, s:none, [s:attrs.bold])
call s:h('Statement', s:orange, s:none, [s:attrs.bold])
hi! link Conditional Statement
hi! link Repeat Statement
hi! link Label Statement
hi! link Operator Statement
hi! link Exception Statement
call s:h('Keyword', s:sun, s:none, [s:attrs.bold])
call s:h('PreProc', s:magenta, s:none)
hi! link Include PreProc
hi! link PreCondit PreProc
call s:h('Define', s:gray_6, s:none)
call s:h('Macro', s:sun, s:none)
call s:h('StorageClass', s:teal, s:none, [s:attrs.bold])
hi! link Typedef StorageClass
call s:h('Structure', s:orange, s:none, [s:attrs.bold])
call s:h('Type', s:teal, s:none, [s:attrs.bold])
call s:h('Delimiter', s:gray_6, s:none)
call s:h('Special', s:magenta, s:none, [s:attrs.bold])
call s:h('SpecialComment', s:blue, s:none, [s:attrs.bold])
call s:h('Tag', s:orange, s:none)
" netrw
call s:h('netrwTreeBar', s:blue, s:none)
call s:h('netrwDir', s:magenta, s:none)
call s:h('netrwClassify', s:orange, s:none)
call s:h('netrwSuffixes', s:sun, s:none)
" vim-ale, coc.nvim
call s:h('ALEErrorSign', s:red_2, s:none)
call s:h('ALEWarningSign', s:yellow, s:none)
hi! link CocErrorSign ALEErrorSign
hi! link CocWarningSign ALEWarningSign
hi! link CocInfoSign ALEWarningSign
call s:h('CocErrorFloat', s:red_2, s:none, [s:attrs.bold])
call s:h('CocWarningFloat', s:orange, s:none, [s:attrs.bold])
" vim-indent-guides
call s:h('IndentGuidesOdd', s:gray_4, s:none)
call s:h('IndentGuidesEven', s:gray_4, s:none)
" you-are-here.vim
call s:h('YouAreHereActiveBorder', s:magenta, s:gray_2)
" vim-startify
call s:h('StartifyHeader', s:magenta, s:none)
hi default CocUnderline cterm=undercurl gui=undercurl
" hi! link helpHyperTextJump PopPunkLink
" hi! link helpCommand PopPunkPurple
" hi! link helpExample PopPunkGreen
" hi! link helpBacktick Special
#!/bin/bash
onedark_black="#131920"
onedark_blue="#61afef"
onedark_yellow="#fbde2d"
onedark_red="#f55613"
onedark_white="#ffffff"
onedark_green="#36A3D9"
onedark_visual_grey="#1D242D"
onedark_comment_grey="#5c6370"
onedark_hl="#480BC9"
onedark_hl_fg="#ffffff"
get() {
local option=$1
local default_value=$2
local option_value="$(tmux show-option -gqv "$option")"
if [ -z "$option_value" ]; then
echo "$default_value"
else
echo "$option_value"
fi
}
set() {
local option=$1
local value=$2
tmux set-option -gq "$option" "$value"
}
setw() {
local option=$1
local value=$2
tmux set-window-option -gq "$option" "$value"
}
set "status" "on"
set "status-justify" "left"
set "status-left-length" "100"
set "status-right-length" "100"
set "status-right-attr" "none"
set "message-fg" "$onedark_white"
set "message-bg" "$onedark_black"
set "message-command-fg" "$onedark_white"
set "message-command-bg" "$onedark_black"
set "status-attr" "none"
set "status-left-attr" "none"
setw "window-status-fg" "$onedark_black"
setw "window-status-bg" "$onedark_black"
setw "window-status-attr" "none"
setw "window-status-activity-bg" "$onedark_black"
setw "window-status-activity-fg" "$onedark_black"
setw "window-status-activity-attr" "none"
setw "window-status-separator" ""
set "window-style" "fg=$onedark_comment_grey"
set "window-active-style" "fg=$onedark_white"
set "pane-border-fg" "$onedark_white"
set "pane-border-bg" "$onedark_black"
set "pane-active-border-fg" "$onedark_green"
set "pane-active-border-bg" "$onedark_black"
set "display-panes-active-colour" "$onedark_yellow"
set "display-panes-colour" "$onedark_blue"
set "status-bg" "$onedark_black"
set "status-fg" "$onedark_white"
set "@prefix_highlight_fg" "$onedark_black"
set "@prefix_highlight_bg" "$onedark_green"
set "@prefix_highlight_copy_mode_attr" "fg=$onedark_black,bg=$onedark_green"
set "@prefix_highlight_output_prefix" "  "
status_widgets=$(get "@onedark_widgets")
time_format=$(get "@onedark_time_format" "%R")
date_format=$(get "@onedark_date_format" "%d/%m/%Y")
set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format}  ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_hl,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_hl_fg,bg=$onedark_hl,bold] #h "
set "status-left" "#[fg=$onedark_hl_fg,bg=$onedark_hl,bold] #S #{prefix_highlight}#[fg=$onedark_hl,bg=$onedark_black,nobold,nounderscore,noitalics]"
set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I  #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]"
set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I  #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment