From 9469780d10d6de4a5da47754158f5b34162c780d Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Mon, 15 Apr 2019 20:24:52 +0100 Subject: [PATCH] update --- UltiSnips/html.snippets | 10 ++ UltiSnips/vue.snippets | 23 +++++ colors/monotonous-dark.vim | 12 ++- vimrc | 184 ++++++++++++++++--------------------- 4 files changed, 118 insertions(+), 111 deletions(-) diff --git a/UltiSnips/html.snippets b/UltiSnips/html.snippets index 7c44583..04f6b9b 100644 --- a/UltiSnips/html.snippets +++ b/UltiSnips/html.snippets @@ -9,3 +9,13 @@ endsnippet snippet plc " + ${VISUAL}$0 + +endsnippet + +snippet .tran "vue transition selector" +.$1 { + &-enter-active { + transition: ${2:opacity} ${3:1}s; + } + + &-leave-active { + transition: $2 ${4:1}s; + } + + &-enter, + &-leave-to { + $2: ${5:0}; + } +}$0 +endsnippet diff --git a/colors/monotonous-dark.vim b/colors/monotonous-dark.vim index 909d931..352bd6b 100644 --- a/colors/monotonous-dark.vim +++ b/colors/monotonous-dark.vim @@ -41,7 +41,7 @@ if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") hi Include ctermbg=NONE ctermfg=238 cterm=NONE guibg=NONE guifg=#494646 gui=NONE hi Comment ctermbg=NONE ctermfg=240 cterm=bold,italic guibg=NONE guifg=#5d5d5d gui=bold,italic hi SpecialComment ctermbg=NONE ctermfg=244 cterm=italic guibg=NONE guifg=#857f7f gui=italic - hi Todo ctermbg=NONE ctermfg=196 cterm=bold,italic guibg=NONE guifg=#990000 gui=bold,italic + hi Todo ctermbg=NONE ctermfg=196 cterm=bold,italic guibg=NONE guifg=#ff4500 gui=bold,italic hi Ignore ctermbg=NONE ctermfg=234 cterm=NONE guibg=NONE guifg=#202122 gui=NONE hi Conceal ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE hi Error ctermbg=NONE ctermfg=196 cterm=bold guibg=NONE guifg=#c74444 gui=bold @@ -201,6 +201,7 @@ if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") hi link htmlDataValue Constant hi link htmlHrefArg htmlArg hi link htmlHrefValue htmlSrcValue + hi vueSpecial ctermbg=NONE ctermfg=21 cterm=bold guibg=NONE guifg=#beb9d1 gui=bold hi vueTagSpecial ctermbg=NONE ctermfg=20 cterm=bold guibg=NONE guifg=#a6a5c4 gui=bold hi vueTagComponentName ctermbg=NONE ctermfg=19 cterm=bold guibg=NONE guifg=#8685a7 gui=bold hi vueDynamicComponent ctermbg=NONE ctermfg=17 cterm=bold guibg=NONE guifg=#6c6b86 gui=bold @@ -211,9 +212,9 @@ if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") hi link vueTransitionMode String hi link vueDirective Identifier hi link vueEvent Function - hi link vueConditional Special + hi link vueConditional vueSpecial hi link vueFor vueConditional - hi link vueRef vueDirective + hi link vueRef vueSpecial hi link vueSlot Noise hi link vueDirectiveValue Type hi link vueEventValue vueDirectiveValue @@ -565,6 +566,7 @@ elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16 hi link htmlDataValue Constant hi link htmlHrefArg htmlArg hi link htmlHrefValue htmlSrcValue + hi vueSpecial ctermbg=NONE ctermfg=blue cterm=bold hi vueTagSpecial ctermbg=NONE ctermfg=blue cterm=bold hi vueTagComponentName ctermbg=NONE ctermfg=darkblue cterm=bold hi vueDynamicComponent ctermbg=NONE ctermfg=darkblue cterm=bold @@ -575,9 +577,9 @@ elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16 hi link vueTransitionMode String hi link vueDirective Identifier hi link vueEvent Function - hi link vueConditional Special + hi link vueConditional vueSpecial hi link vueFor vueConditional - hi link vueRef vueDirective + hi link vueRef vueSpecial hi link vueSlot Noise hi link vueDirectiveValue Type hi link vueEventValue vueDirectiveValue diff --git a/vimrc b/vimrc index 537a6c9..3298ba3 100644 --- a/vimrc +++ b/vimrc @@ -136,10 +136,6 @@ Plug 'plasticboy/vim-markdown' let g:vim_markdown_toc_autofit = 1 let g:vim_markdown_fenced_languages = ['bash=sh'] "}}} -" #vim-qlist {{{ -" Original: https://github.com/romainl/vim-qlist -Plug 'studio-vx/vim-qlist' -"}}} " #vim-repeat{{{ " https://github.com/tpope/vim-repeat Plug 'tpope/vim-repeat' @@ -169,11 +165,6 @@ Plug 'studio-vx/vim-qlist' " https://wakatime.com/vim Plug 'wakatime/vim-wakatime' - "}}} -" #wal.vim {{{ - " https://github.com/dylanaraps/wal.vim - Plug 'dylanaraps/wal.vim' - "}}} " development plugins if g:vimrc_load_dev_plugins"{{{ @@ -273,11 +264,6 @@ if g:vimrc_load_dev_plugins"{{{ xmap ih GitGutterTextObjectInnerVisual xmap ah GitGutterTextObjectOuterVisual - "}}} -" #gitv{{{ - " https://github.com/gregsexton/gitv - Plug 'gregsexton/gitv' - "}}} " #html5{{{ " https://github.com/othree/html5.vim @@ -289,36 +275,6 @@ if g:vimrc_load_dev_plugins"{{{ Plug 'mboughaba/i3config.vim' "}}} -" #inline_edit.vim {{{ - " https://github.com/AndrewRadev/inline_edit.vim - Plug 'AndrewRadev/inline_edit.vim' - - let g:inline_edit_patterns = [{ - \ 'main_filetype': '*html', - \ 'sub_filetype': 'scss', - \ 'indent_adjustment': 1, - \ 'start': '[^>]*lang=.scss[^>]*>', - \ 'end': '' - \ }] - - let g:inline_edit_autowrite = 1 - let g:inline_edit_proxy_type = 'tempfile' - let g:inline_edit_new_buffer_command ='tabedit' - let g:inline_edit_modify_statusline = 0 - - nnoremap ie :InlineEdit - - "}}} -" #livedown.vim {{{ - " https://github.com/shime/vim-livedown - Plug 'shime/vim-livedown' - - let g:livedown_port = 4343 - let g:livedown_command = '/home/ray/.npm-global/bin/livedown' - let g:livedown_open = 0 - let g:livedown_browser = 'qutebrowser' - nnoremap md :LivedownToggle -"}}} " #php.vim{{{ " https://github.com/StanAngeloff/php.vim Plug 'StanAngeloff/php.vim' @@ -348,49 +304,49 @@ if g:vimrc_load_dev_plugins"{{{ "}}} " #tagbar {{{ - Plug 'majutsushi/tagbar' - - nnoremap tb :TagbarOpen fj - nnoremap ] :tag /[.#@]=expand('') - let g:tagbar_autoclose = 1 - " let g:tagbar_autopreview = 1 - " let g:tagbar_previewwin_pos = '' - - let g:tagbar_type_css = { - \ 'ctagstype' : 'css', - \ 'kinds' : [ - \ 'c:classes', - \ 'i:ids', - \ 't:tags', - \ 'm:medias' - \ ] - \} - - let g:tagbar_type_scss = { - \ 'ctagstype' : 'scss', - \ 'kinds' : [ - \ 'v:variables', - \ 'c:classes', - \ 'i:ids', - \ 't:tags', - \ 'd:medias', - \ 'm:mixins', - \ 'f:functions' - \ ] - \} - - let g:tagbar_type_vue = { - \ 'ctagstype' : 'vue', - \ 'kinds' : [ - \ 'o:objects', - \ 'f:functions', - \ 'a:array', - \ 's:string', - \ 'b:boolean', - \ 'n:number', - \ 'v:variable' - \ ] - \ } + " Plug 'majutsushi/tagbar' + " + " nnoremap tb :TagbarOpen fj + " nnoremap ] :tag /[.#@]=expand('') + " let g:tagbar_autoclose = 1 + " " let g:tagbar_autopreview = 1 + " " let g:tagbar_previewwin_pos = '' + " + " let g:tagbar_type_css = { + " \ 'ctagstype' : 'css', + " \ 'kinds' : [ + " \ 'c:classes', + " \ 'i:ids', + " \ 't:tags', + " \ 'm:medias' + " \ ] + " \} + " + " let g:tagbar_type_scss = { + " \ 'ctagstype' : 'scss', + " \ 'kinds' : [ + " \ 'v:variables', + " \ 'c:classes', + " \ 'i:ids', + " \ 't:tags', + " \ 'd:medias', + " \ 'm:mixins', + " \ 'f:functions' + " \ ] + " \} + " + " let g:tagbar_type_vue = { + " \ 'ctagstype' : 'vue', + " \ 'kinds' : [ + " \ 'o:objects', + " \ 'f:functions', + " \ 'a:array', + " \ 's:string', + " \ 'b:boolean', + " \ 'n:number', + " \ 'v:variable' + " \ ] + " \ } "}}} " #ultisnips {{{ @@ -452,11 +408,6 @@ if g:vimrc_load_dev_plugins"{{{ " https://github.com/tpope/vim-dispatch Plug 'tpope/vim-dispatch' - "}}} -" #vim-fish{{{ - " https://github.com/dag/vim-fish - Plug 'dag/vim-fish' - "}}} " #vim-gutentags {{{ " https://github.com/ludovicchabant/vim-gutentags @@ -573,7 +524,7 @@ if g:vimrc_load_dev_plugins"{{{ " This fork does: " https://github.com/DArcMattr/wordpress.vim/tree/universal-ctags " Using studio-vx fork - Plug 'studio-vx/wordpress.vim', { 'branch': 'universal-ctags' } + " Plug 'studio-vx/wordpress.vim', { 'branch': 'universal-ctags' } "}}} " #vim-git{{{ @@ -586,10 +537,21 @@ endif"}}} #dev plugins end if has('nvim') " nvim only plugins " #colorV {{{ - " original: " https://github.com/gu-fan/colorv.vim Plug 'gu-fan/colorv.vim' "}}} +" #vim-hexokinase {{{ + " https://github.com/RRethy/vim-hexokinase + Plug 'RRethy/vim-hexokinase' + let g:Hexokinase_virtualText = '██████' + nnoremap cc :HexokinaseToggle + nnoremap cr :HexokinaseRefresh + "}}} +" #ranger.vim {{{ + " https://github.com/francoiscabrol/ranger.vim + Plug 'francoiscabrol/ranger.vim' + let g:ranger_map_keys = 0 + "}}} else " vim only plugins " #colorV {{{ @@ -599,6 +561,7 @@ else " vim only plugins " custom fork: " https://github.com/studio-vx/colorv.vim Plug 'studio-vx/colorv.vim' + nnoremap cc :call ToggleColorPreview() "}}} end @@ -612,7 +575,6 @@ end nnoremap cv :ColorV nnoremap ce :ColorVEdit - nnoremap cc :call ToggleColorPreview() nnoremap ci :ColorVInsert nnoremap cp :ColorVPicker @@ -836,19 +798,29 @@ command! -nargs=* DD silent! call system(len(split(, ' ')) == 0 ? \ s:stub . &ft . ' ' . . "'" : s:stub . . "'") "}}} -if !exists('*RangerExplorer') "{{{ -" use ranger as file manager - function RangerExplorer() abort - exec 'silent !ranger --choosefile=/tmp/vim_ranger_current_file ' . expand('%:p:h') - if filereadable('/tmp/vim_ranger_current_file') - exec 'edit ' . system('cat /tmp/vim_ranger_current_file') - call system('rm /tmp/vim_ranger_current_file') - endif - redraw! - endfun -map ra :call RangerExplorer() + +if has('nvim') + if !exists('*RangerExplorer') "{{{ + function RangerExplorer() abort + exec 'silent Ranger' + endfun + nnoremap ra :call RangerExplorer() + endif +else + if !exists('*RangerExplorer') "{{{ + function RangerExplorer() abort + exec 'silent !ranger --choosefile=/tmp/vim_ranger_current_file ' . expand('%:p:h') + if filereadable('/tmp/vim_ranger_current_file') + exec 'edit ' . system('cat /tmp/vim_ranger_current_file') + call system('rm /tmp/vim_ranger_current_file') + endif + redraw! + endfun + nnoremap ra :call RangerExplorer() + endif endif + "}}} function! WinEnterColorColumn() abort"{{{ if &buftype != ''