diff options
author | Urbain Vaes <urbain@vaes.uk> | 2020-04-11 19:37:11 +0200 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2020-04-11 19:37:11 +0200 |
commit | 1653d28086c07998be4e30e1d3857cb85e59aa0f (patch) | |
tree | 5d2e2e50668417cb552840d7662dbe5fc57f14cb /vim | |
parent | dc6a4bfb76eb92519c3d17d790055a546cdb9df5 (diff) |
Move auxiliary functions to plugin
Diffstat (limited to 'vim')
-rw-r--r-- | vim/.vim/after/colors/colors.vim | 4 | ||||
-rw-r--r-- | vim/.vim/after/syntax/vim.vim | 25 | ||||
-rw-r--r-- | vim/.vimrc | 42 |
3 files changed, 8 insertions, 63 deletions
diff --git a/vim/.vim/after/colors/colors.vim b/vim/.vim/after/colors/colors.vim deleted file mode 100644 index 7c8c10a..0000000 --- a/vim/.vim/after/colors/colors.vim +++ /dev/null @@ -1,4 +0,0 @@ -for i in range(1, 255) - exe "highlight vimHiNmbrFg".i." ctermfg=".i - exe "highlight vimHiNmbrBg".i." ctermfg=black ctermbg=".i -endfor diff --git a/vim/.vim/after/syntax/vim.vim b/vim/.vim/after/syntax/vim.vim deleted file mode 100644 index 78e8d37..0000000 --- a/vim/.vim/after/syntax/vim.vim +++ /dev/null @@ -1,25 +0,0 @@ -" 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 -hi def link vimHiCtermFg vimHiCtermFgBg -hi def link vimHiCtermBg vimHiCtermFgBg - -" 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" -endfor @@ -62,8 +62,9 @@ Plug 'wellle/targets.vim' 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' + Plug '~/dotfiles/plugins/vim-darjeeling' + Plug '~/dotfiles/plugins/vim-macaw' endif if has("nvim") @@ -271,7 +272,7 @@ set undodir^=~/.vim/undo// " ^= : prepends to list " // : store absolute path -set complete+=k +" set complete+=k set conceallevel=2 set cursorline set diffopt=filler,vertical,hiddenoff @@ -283,6 +284,7 @@ set ignorecase set lazyredraw set laststatus=2 set mouse=a +" set noequalalways set nojoinspaces set nowrap set path+=$PWD/** @@ -384,8 +386,8 @@ nmap co yo "" Autocommands {{{1 augroup vimrc - autocmd! - autocmd ColorScheme * source $HOME/dotfiles/vim/.vim/after/colors/colors.vim + " autocmd! + " autocmd ColorScheme * source $HOME/dotfiles/vim/.vim/after/colors/colors.vim autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\<cr>") autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 @@ -417,13 +419,10 @@ augroup vimrc augroup END "" Colorscheme {{{1 -nnoremap ,c :colorscheme<space> -nnoremap ,cl :set background=light<cr>:colorscheme solarized<cr> -nnoremap ,cl :set background=dark<cr>:colorscheme solarized<cr> +nnoremap ,cd :colorscheme darjeeling<cr> nnoremap ,cs :colorscheme seoul256<cr> -nnoremap ,cn :colorscheme nord<cr> set notermguicolors -colo seoul256 +colo darjeeling "" My search {{{1 @@ -555,17 +554,6 @@ hi Pmenu ctermfg=3 ctermbg=239 " root_dir = vim's starting directory " settings = {} -" if !exists('g:lsp_config_sourced') -" call lsp#add_filetype_config({ -" \ 'filetype': 'python', -" \ 'name': 'pyls', -" \ 'cmd': 'pyls', -" \ 'callbacks': {} -" \ }) -" autocmd Filetype python setl omnifunc=lsp#omnifunc -" let g:lsp_config_sourced = 1 -" endif - " lua <<EOF " vim.lsp.start_client({"pyls"}) " EOF @@ -580,17 +568,3 @@ nnoremap <silent> <c-g>d <cmd>lua vim.lsp.buf.definition()<cr> nnoremap <silent> <c-g>i <cmd>lua vim.lsp.buf.implementation()<cr> nnoremap <silent> <c-g>s <cmd>lua vim.lsp.buf.signature_help()<cr> nnoremap <silent> <c-g>t <cmd>lua vim.lsp.buf.type_definition()<cr> - - -" function! Autocomplete() -" let [l, c] = [getline("."), col(".")] -" if l[c-5:c-2] == "cite" || l[c-4:c-2] == "ref" -" return "{\<c-x>\<c-o>" -" endif -" return "{" -" endfunction - -" augroup autocompletion -" autocmd! -" autocmd FileType tex inoremap <expr> { Autocomplete() -" augroup END |