From 0587d80453bc92acb20b351fd17bc2f9126e01b0 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 2 Apr 2022 11:48:21 +0800 Subject: Update plugin config location in vim --- .vim/after/plugin/editorconfig.vim | 2 ++ .vim/after/plugin/fugitive.vim | 7 +++++++ .vim/after/plugin/fzf.vim | 22 ++++++++++++++++++++ .vim/after/plugin/godot.vim | 42 ++++++++++++++++++++++++++++++++++++++ .vim/after/plugin/gutentags.vim | 21 +++++++++++++++++++ .vim/after/plugin/ledger.vim | 14 +++++++++++++ .vim/after/plugin/rooter.vim | 1 + .vim/after/plugin/ultisnips.vim | 3 +++ 8 files changed, 112 insertions(+) create mode 100644 .vim/after/plugin/editorconfig.vim create mode 100644 .vim/after/plugin/fugitive.vim create mode 100644 .vim/after/plugin/fzf.vim create mode 100644 .vim/after/plugin/godot.vim create mode 100644 .vim/after/plugin/gutentags.vim create mode 100644 .vim/after/plugin/ledger.vim create mode 100644 .vim/after/plugin/rooter.vim create mode 100644 .vim/after/plugin/ultisnips.vim (limited to '.vim/after') diff --git a/.vim/after/plugin/editorconfig.vim b/.vim/after/plugin/editorconfig.vim new file mode 100644 index 0000000..70a4c16 --- /dev/null +++ b/.vim/after/plugin/editorconfig.vim @@ -0,0 +1,2 @@ +let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] +au FileType gitcommit let b:EditorConfig_disable = 1 diff --git a/.vim/after/plugin/fugitive.vim b/.vim/after/plugin/fugitive.vim new file mode 100644 index 0000000..6178757 --- /dev/null +++ b/.vim/after/plugin/fugitive.vim @@ -0,0 +1,7 @@ +" nnoremap gs :tabnew +Git + +nnoremap gp :G push +nnoremap g :G +nnoremap gd :Gvdiffsplit +nnoremap gl :Gclog % +xnoremap gl :Gclog diff --git a/.vim/after/plugin/fzf.vim b/.vim/after/plugin/fzf.vim new file mode 100644 index 0000000..cda5a27 --- /dev/null +++ b/.vim/after/plugin/fzf.vim @@ -0,0 +1,22 @@ +let g:fzf_command_prefix = 'Fzf' + +command! -bang -nargs=* FzfRg + \ call fzf#vim#grep( + \ 'rg --hidden --column --line-number --no-heading --color=always --smart-case --glob !.git -- '.shellescape(), 1, + \ fzf#vim#with_preview(), 0) + +noremap ff :FzfFiles +noremap fgf :FzfGFiles +noremap fb :FzfBuffers +noremap fm :FzfHistory +noremap ft :FzfBTags +noremap fT :FzfTags +noremap fa :FzfAg +noremap fr :FzfRg +noremap fc :FzfCommands +noremap fgc :FzfBCommits +noremap fgC :FzfCommits +noremap fl :FzfBLines +noremap fL :FzfLines + +packadd fzf.vim diff --git a/.vim/after/plugin/godot.vim b/.vim/after/plugin/godot.vim new file mode 100644 index 0000000..655710e --- /dev/null +++ b/.vim/after/plugin/godot.vim @@ -0,0 +1,42 @@ +if has('macunix') + let g:godot_executable = '/Applications/Godot.app' +endif + +if has('win32') || has('win32unix') + let g:godot_executable = '' +endif + +func! s:godot_settings() abort + setlocal tabstop=4 + nnoremap rl :GodotRunLast + nnoremap rc :GodotRunCurrent + nnoremap rr :GodotRun +endfunc + +augroup godot | au! + au FileType gdscript call s:godot_settings() +augroup end + +"YCM config + +if !has_key( g:, 'ycm_language_server' ) + let g:ycm_language_server = [] +endif + +let g:ycm_language_server += [ + \ { + \ 'name': 'godot', + \ 'filetypes': ['gdscript'], + \ 'project_root_files': ['project.godot'], + \ 'port': 6008 + \ } + \ ] + +" ALE config + +call ale#linter#Define('gdscript', { +\ 'name': 'godot', +\ 'lsp': 'socket', +\ 'address': '127.0.0.1:6008', +\ 'project_root': 'project.godot', +\ }) diff --git a/.vim/after/plugin/gutentags.vim b/.vim/after/plugin/gutentags.vim new file mode 100644 index 0000000..cab2f3b --- /dev/null +++ b/.vim/after/plugin/gutentags.vim @@ -0,0 +1,21 @@ +let g:gutentags_project_root = ['.root', '.svn', '.git', '.hg', '.project'] +let g:gutentags_ctags_tagfile = '.tags' +let g:gutentags_cache_dir = expand('~/.cache/tags') +let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extras=+q'] +let g:gutentags_ctags_extra_args += ['--c++-kinds=+px'] +let g:gutentags_ctags_extra_args += ['--c-kinds=+px'] +let g:gutentags_ctags_extra_args += ['--output-format=e-ctags'] +let g:gutentags_define_advanced_commands = 1 + +let $GTAGSLABEL = 'native-pygments' +let $GTAGSCONF = '/usr/local/share/gtags/gtags.conf' + +let g:airline#extensions#gutentags#enabled = 1 + +let g:gutentags_modules = [] +if executable('ctags') + let g:gutentags_modules += ['ctags'] +endif +if executable('gtags') && executable('gtags-cscope') + let g:gutentags_modules += ['gtags_cscope'] +endif diff --git a/.vim/after/plugin/ledger.vim b/.vim/after/plugin/ledger.vim new file mode 100644 index 0000000..77f5f3a --- /dev/null +++ b/.vim/after/plugin/ledger.vim @@ -0,0 +1,14 @@ +let g:ledger_bin = 'ledger' +let g:ledger_align_at = 50 +let g:ledger_commodity_before = 0 +let g:ledger_align_commodity = 1 +let g:ledger_extra_options = '--pedantic --explicit --check-payees' + +function! s:ledger_keymap() abort + noremap { ?^\d + noremap } /^\d + inoremap =ledger#autocomplete_and_align() + vnoremap :LedgerAlign +endfunction + +au FileType ledger call s:ledger_keymap() diff --git a/.vim/after/plugin/rooter.vim b/.vim/after/plugin/rooter.vim new file mode 100644 index 0000000..bb07c0a --- /dev/null +++ b/.vim/after/plugin/rooter.vim @@ -0,0 +1 @@ +let g:rooter_patterns = ['.git'] diff --git a/.vim/after/plugin/ultisnips.vim b/.vim/after/plugin/ultisnips.vim new file mode 100644 index 0000000..579cd03 --- /dev/null +++ b/.vim/after/plugin/ultisnips.vim @@ -0,0 +1,3 @@ +let g:UltiSnipsExpandTrigger='' +let g:UltiSnipsJumpForwardTrigger='' +let g:UltiSnipsJumpBackwardTrigger='' -- cgit v1.2.3