diff --git a/vim/vimrc.d/devicons.vim b/vim/vimrc.d/devicons.vim new file mode 100644 index 0000000..34b4b44 --- /dev/null +++ b/vim/vimrc.d/devicons.vim @@ -0,0 +1,83 @@ +let g:WebDevIconsUnicodeDecorateFolderNodes = 1 + +let g:sol = { + \"gui": { + \"base03": "#002b36", + \"base02": "#073642", + \"base01": "#586e75", + \"base00": "#657b83", + \"base0": "#839496", + \"base1": "#93a1a1", + \"base2": "#eee8d5", + \"base3": "#fdf6e3", + \"yellow": "#b58900", + \"orange": "#cb4b16", + \"red": "#dc322f", + \"magenta": "#d33682", + \"violet": "#6c71c4", + \"blue": "#268bd2", + \"cyan": "#2aa198", + \"green": "#719e07" + \}, + \"cterm": { + \"base03": 8, + \"base02": 0, + \"base01": 10, + \"base00": 11, + \"base0": 12, + \"base1": 14, + \"base2": 7, + \"base3": 15, + \"yellow": 3, + \"orange": 9, + \"red": 1, + \"magenta": 5, + \"violet": 13, + \"blue": 4, + \"cyan": 6, + \"green": 2 + \} +\} + +function! DeviconsColors(config) + let colors = keys(a:config) + + augroup devicons_colors + autocmd! + + for color in colors + if color == 'normal' + exec 'autocmd FileType nerdtree,startify if &background == ''dark'' | '. + \ 'highlight devicons_'.color.' guifg='.g:sol.gui.base01.' ctermfg='.g:sol.cterm.base01.' | '. + \ 'else | '. + \ 'highlight devicons_'.color.' guifg='.g:sol.gui.base1.' ctermfg='.g:sol.cterm.base1.' | '. + \ 'endif' + elseif color == 'emphasize' + exec 'autocmd FileType nerdtree,startify if &background == ''dark'' | '. + \ 'highlight devicons_'.color.' guifg='.g:sol.gui.base1.' ctermfg='.g:sol.cterm.base1.' | '. + \ 'else | '. + \ 'highlight devicons_'.color.' guifg='.g:sol.gui.base01.' ctermfg='.g:sol.cterm.base01.' | '. + \ 'endif' + else + exec 'autocmd FileType nerdtree,startify highlight devicons_'.color.' guifg='.g:sol.gui[color].' ctermfg='.g:sol.cterm[color] + endif + + exec 'autocmd FileType nerdtree,startify syntax match devicons_'.color.' /\v'.join(a:config[color], '|').'/ containedin=ALL' + endfor + augroup END +endfunction + +let g:devicons_colors = { + \'normal': ['', '', '', '', ''], + \'emphasize': ['', '', '', '', '', '', '', '', '', '', ''], + \'yellow': ['', '', ''], + \'orange': ['', '', '', 'λ', '', ''], + \'red': ['', '', '', '', '', '', '', '', ''], + \'magenta': [''], + \'violet': ['', '', '', '', '●'], + \'blue': ['', '', '', '', '', '', '', '', '', '', '', '', ''], + \'cyan': ['', '', '', ''], + \'green': ['', '', '', ''] +\} + +call DeviconsColors(g:devicons_colors) diff --git a/vimrc.bundles.local b/vimrc.bundles.local index d9244bb..8e5f2f0 100644 --- a/vimrc.bundles.local +++ b/vimrc.bundles.local @@ -9,6 +9,8 @@ Plug 'ConradIrwin/vim-bracketed-paste' Plug 'rizzatti/dash.vim' +Plug 'ryanoasis/vim-devicons' + " Language additions Plug 'briancollins/vim-jst' Plug 'elixir-lang/vim-elixir' diff --git a/vimrc.local b/vimrc.local index 050ad8c..f4aa80a 100644 --- a/vimrc.local +++ b/vimrc.local @@ -6,7 +6,7 @@ colorscheme Tomorrow-Night if has("gui_running") || has("gui_vimr") " Set GUI font according to OS if has("gui_macvim") - set guifont=Source\ Code\ Pro\ for\ Powerline:h13 + set guifont=Sauce\ Code\ Pro\ Nerd\ Font\ Complete\ Mono:h13 elseif has("gui_gtk2") set guifont=DejaVu\ Sans\ Mono\ 15 endif @@ -22,11 +22,11 @@ if has("gui_running") || has("gui_vimr") set guioptions-=l endif -" Map ctrl-hjkl for easy window movement -map h -map j -map k -map l +" Display extra whitespace +set list listchars=tab:»·,trail:· + +" Map ctrl-a to redraw +nnoremap :redraw! " Set Scroll off set scrolloff=12