From 56c4ecf8f8d45b35ef0f09c74ca247adae4f4590 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Tue, 9 Apr 2019 22:47:08 +0100 Subject: [PATCH] nvim integration --- vimrc | 110 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/vimrc b/vimrc index 5b0659b..537a6c9 100644 --- a/vimrc +++ b/vimrc @@ -24,8 +24,13 @@ if empty(glob('~/.vim/autoload/plug.vim'))"{{{ endif "}}} -if !has('nvim') + + +if has('nvim') + call plug#begin('~/.config/nvim/bundle') +else call plug#begin('~/.vim/bundle') +endif Plug '~/.config/vim/vim/bundle/vim-learnxiny' @@ -171,7 +176,7 @@ Plug 'studio-vx/vim-qlist' "}}} " development plugins -if g:vimrc_load_dev_plugins +if g:vimrc_load_dev_plugins"{{{ " #ALE {{{ " https://github.com/w0rp/ale Plug 'w0rp/ale' @@ -238,42 +243,6 @@ if g:vimrc_load_dev_plugins " endif " endfunction " " }}} -" #colorV {{{ - " original: - " https://github.com/gu-fan/colorv.vim - " Plug 'gu-fan/colorv.vim' - " custom fork: - " https://github.com/studio-vx/colorv.vim - Plug 'studio-vx/colorv.vim' - - let g:ColorVForceGuiColors = 1 - - let g:colorv_no_global_map = 1 - let g:colorv_win_pos = 'top' - let g:colorv_preview_area = 0 - - nnoremap cv :ColorV - nnoremap ce :ColorVEdit - nnoremap cc :call ToggleColorPreview() - nnoremap ci :ColorVInsert - nnoremap cp :ColorVPicker - - let w:colorv_is_previewing = 0 - function! ToggleColorPreview() abort "{{{ - if !exists('w:colorv_is_previewing') - let w:colorv_is_previewing = 0 - endif - if w:colorv_is_previewing == 0 - execute 'ColorVPreview' - let w:colorv_is_previewing = 1 - else - execute 'ColorVClear' - let w:colorv_is_previewing = 0 - endif - endfunction "}}} - - - "}}} " #css3-syntax{{{ Plug 'hail2u/vim-css3-syntax' @@ -612,12 +581,62 @@ if g:vimrc_load_dev_plugins Plug 'tpope/vim-git' "}}} -endif - call plug#end() -endif +endif"}}} #dev plugins end + + +if has('nvim') " nvim only plugins +" #colorV {{{ + " original: + " https://github.com/gu-fan/colorv.vim + Plug 'gu-fan/colorv.vim' + "}}} + +else " vim only plugins +" #colorV {{{ + " original: + " https://github.com/gu-fan/colorv.vim + " Plug 'gu-fan/colorv.vim' + " custom fork: + " https://github.com/studio-vx/colorv.vim + Plug 'studio-vx/colorv.vim' + "}}} + +end + +" #colorV settings {{{ + let g:ColorVForceGuiColors = 1 + + let g:colorv_no_global_map = 1 + let g:colorv_win_pos = 'top' + let g:colorv_preview_area = 0 + + nnoremap cv :ColorV + nnoremap ce :ColorVEdit + nnoremap cc :call ToggleColorPreview() + nnoremap ci :ColorVInsert + nnoremap cp :ColorVPicker + + let w:colorv_is_previewing = 0 + function! ToggleColorPreview() abort "{{{ + if !exists('w:colorv_is_previewing') + let w:colorv_is_previewing = 0 + endif + if w:colorv_is_previewing == 0 + execute 'ColorVPreview' + let w:colorv_is_previewing = 1 + else + execute 'ColorVClear' + let w:colorv_is_previewing = 0 + endif + endfunction "}}} +" }}} + + +call plug#end() runtime macros/matchit.vim + "----------------------------------------------------------------------------}}} " #functions {{{ @@ -1038,14 +1057,7 @@ command! -nargs=1 -complete=command Redir silent call Redir() " :Redir hi ............. show the full output of command ':hi' in a scratch window " :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window "}}} -function Test() abort "{{{ - let job = job_start('ls -lah', {'callback': 'Testcallback'}) -endfunction -"}}} -function Testcallback(channel, msg) abort - echom a:channel . ': ' . a:msg -endfunction -"}}} +"}}} end #functions "----------------------------------------------------------------------------}}} "#commands{{{ " TrimWhitespace{{{