diff options
author | Urbain Vaes <urbain@vaes.uk> | 2020-04-07 12:18:21 +0200 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2020-04-07 12:18:21 +0200 |
commit | af174aee615ad634cd457ee1c842d4aa89f3a59c (patch) | |
tree | 7d0688fb1b18f3d4d453b0e01a9d97e048ffae37 | |
parent | 72c51052ac3b9bd9275b3710f543fe5da4ecbeca (diff) |
Improve vim syntax for colors
-rw-r--r-- | .mrconfig | 5 | ||||
-rwxr-xr-x | bin/.local/bin/workspace | 1 | ||||
-rw-r--r-- | vifm/.config/vifm/vifmrc | 2 | ||||
-rw-r--r-- | vim/.vim/after/syntax/vim.vim | 25 | ||||
-rw-r--r-- | vim/.vimrc | 42 |
5 files changed, 33 insertions, 42 deletions
@@ -17,3 +17,8 @@ push = git push origin master checkout = git clone 'git@github.com:urbainvaes/vim-ripple.git' update = git pull origin master push = git push origin master + +[$HOME/dotfiles/plugins/vim-darjeeling] +checkout = git clone 'git@github.com:urbainvaes/vim-darjeeling.git' +update = git pull origin master +push = git push origin master diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index b3fdfaa..36f09d4 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -8,7 +8,6 @@ workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { $0 !~ "^\\s*$" { gsub(/"/, "", $4) print $4, $6, $10 - }' | sort) act_on_container() { diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index 7a73409..68f6be2 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -1,6 +1,6 @@ " Command to open files filetype *.JPG feh %f & -filetype *.exe wine %f & +filetype *.exe wine %f & filetype * xdg-open %f & " Options diff --git a/vim/.vim/after/syntax/vim.vim b/vim/.vim/after/syntax/vim.vim new file mode 100644 index 0000000..f6b389e --- /dev/null +++ b/vim/.vim/after/syntax/vim.vim @@ -0,0 +1,25 @@ +" Modification of default rule: vimHiCtermFg,vimHiCtermBg instead of vimHiCtermFgBg +syntax cluster vimHiCluster remove=vimHiCtermFgBg +syntax cluster vimHiCluster add=vimHiCtermFg,vimHiCtermBg + +" Modification of default rule: @vimHiNmbrFgCluster,@vimHiNmbrBgCluster instead of vimHiNmbr +syntax match vimHiCtermFg /\cctermfg=/ contained nextgroup=@vimHiNmbrFgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError +syntax match vimHiCtermBg /\cctermbg=/ contained nextgroup=@vimHiNmbrBgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError + +" Assemble syntax groups +let syntax_groups_fg = "vimHiNmbrFg1" +let syntax_groups_bg = "vimHiNmbrBg1" +for i in range(2, 255) + let syntax_groups_fg = syntax_groups_fg.",vimHiNmbrFg".i + let syntax_groups_bg = syntax_groups_bg.",vimHiNmbrBg".i +endfor + +exe "syntax cluster vimHiNmbrFgCluster contains=".syntax_groups_fg +exe "syntax cluster vimHiNmbrBgCluster contains=".syntax_groups_bg + +for i in range(1, 255) + exe "syntax match vimHiNmbrFg".i." /".i."/ contained" + exe "syntax match vimHiNmbrBg".i." /".i."/ contained" + exe "highlight vimHiNmbrFg".i." ctermfg=".i + exe "highlight vimHiNmbrBg".i." ctermfg=black ctermbg=".i +endfor @@ -11,17 +11,12 @@ let maplocalleader = "," "" Plugins {{{1 call plug#begin('~/.vim/plugged') -Plug 'LnL7/vim-nix' Plug 'PotatoesMaster/i3-vim-syntax' Plug 'SirVer/ultisnips' Plug 'airblade/vim-gitgutter' Plug 'AndrewRadev/splitjoin.vim' -Plug 'beloglazov/vim-online-thesaurus' Plug 'easymotion/vim-easymotion' -Plug 'holomorph/vim-freefem' Plug 'honza/vim-snippets' -Plug 'inkarkat/vim-SpellCheck' -Plug 'inkarkat/vim-ingo-library' Plug 'jamessan/vim-gnupg' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' @@ -43,7 +38,6 @@ Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } Plug 'terryma/vim-multiple-cursors' Plug 'tommcdo/vim-exchange' Plug 'tommcdo/vim-ninja-feet' -Plug 'ton/vim-bufsurf' Plug 'tpope/vim-abolish' Plug 'tpope/vim-apathy' Plug 'tpope/vim-commentary' @@ -64,36 +58,23 @@ let g:zoomwintab_hidetabbar=0 Plug 'vim-scripts/ReplaceWithRegister' Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' -" Plug 'zchee/deoplete-clang' if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' + Plug '~/dotfiles/plugins/vim-darjeeling' Plug '~/dotfiles/plugins/vim-ripple' endif if has("nvim") - " Plug 'roxma/nvim-completion-manager' - " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } - " Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } - " Plug 'zchee/deoplete-jedi' Plug 'neovim/nvim-lsp' -else - Plug 'Shougo/neocomplete.vim' endif " Colors -Plug 'KKPMW/sacredforest-vim' Plug 'altercation/vim-colors-solarized' -Plug 'arcticicestudio/nord-vim' -Plug 'KKPMW/moonshine-vim' Plug 'KKPMW/sacredforest-vim' Plug 'junegunn/seoul256.vim' Plug 'romainl/Apprentice' -Plug 'joshdick/onedark.vim' -" Plug 'josuegaleas/jay' - -" Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() "" Plugin configuration {{{1 @@ -555,28 +536,9 @@ set wildcharm=<C-z> nnoremap ,e :e **/*<C-z><S-Tab> let $FZF_DEFAULT_OPTS='--layout=reverse' -let g:fzf_layout = { 'window': 'call FloatingFZF()' } +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } hi Pmenu ctermfg=3 ctermbg=239 -function! FloatingFZF() - let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&laststatus', '1') - - let height = &lines - 10 - let width = float2nr(&columns - (&columns * 2 / 10)) - let col = float2nr((&columns - width) / 2) - - let opts = { - \ 'relative': 'editor', - \ 'row': 5, - \ 'col': col, - \ 'width': width, - \ 'height': height - \ } - - call nvim_open_win(buf, v:true, opts) - call setbufvar(buf, '&laststatus', '2') -endfunction " highlight default link LspDiagnosticsError Delimiter " highlight default link LspDiagnosticsWarning Delimiter |