##################################################################### # Edit util ##################################################################### [[plugins]] repo = 'haya14busa/vim-asterisk' on_map = [ '(asterisk-z*)', '(asterisk-z#)', '(asterisk-gz*)', '(asterisk-gz#)', ] hook_add = ''' map * (asterisk-z*) map # (asterisk-z#) map g* (asterisk-gz*) map g# (asterisk-gz#) ''' [[plugins]] repo = 'mattn/vim-sqlfmt' on_ft = ['sql'] on_map = ['(sqlfmt)'] on_cmd = ['SQLFmt'] hook_add = ''' " Install command `pip install sqlparse` let sqlfmt_bin = fnamemodify(g:python3_host_prog, ':h') . '/'. 'sqlformat' let g:sqlfmt_program = sqlfmt_bin . ' -r -k upper -o %s -' ''' [[plugins]] repo = 'mattn/emmet-vim' on_ft = ['html', 'djangohtml'] ##################################################################### # Programing util ##################################################################### [[plugins]] repo = 'tyru/caw.vim' on_map = ['(caw:hatpos:toggle)', '(caw:zeropos:toggle)'] hook_add = ''' " Add comment to beginning line(consider whitespace) nmap c (caw:hatpos:toggle) vmap c (caw:hatpos:toggle) " Add comment to beginning line(ignore whitespace) nmap , (caw:zeropos:toggle) vmap , (caw:zeropos:toggle) ''' [[plugins]] repo = 'thinca/vim-quickrun' on_cmd = ['QuickRun'] depends = ['vim-quickrun-neovim-job'] hook_add = ''' nnoremap r :QuickRun xnoremap r gv:QuickRun ''' hook_source = 'source ~/.vim/rc/plugins/vimquickrun.rc.vim' [[plugins]] repo = 'lambdalisue/vim-quickrun-neovim-job' [[plugins]] repo = 'nicwest/vim-camelsnek' on_cmd = ['Camel', 'CamelB', 'Snek'] [[plugins]] repo = 'Yggdroot/indentLine' on_cmd = ['IndentLinesToggle'] hook_add = ''' nnoremap i :IndentLinesToggle ''' # [[plugins]] # repo = 'vim-test/vim-test' # on_cmd = [ # 'TestNearest', # 'TestFile', # 'TestSuite', # 'TestLast', # 'TestVisit', # ] # depends = ['tpope/vim-dispatch'] # hook_add = ''' # let g:test#strategy = "dispatch" # nnoremap tt :TestNearest # nnoremap tf :TestFile # nnoremap ts :TestSuite # nnoremap tl :TestLast # nnoremap tv :TestVisit # ''' # # [[plugins]] # repo = 'tpope/vim-dispatch' [[plugins]] repo = 'prettier/vim-prettier' build = 'yarn install' on_ft = [ 'javascript', 'javascript.jsx', 'javascriptreact', 'typescript', 'typescript.tsx', 'typescriptreact', ] hook_add = ''' nmap py (Prettier) ''' ##################################################################### # Fuzzy Finder ##################################################################### [[plugins]] repo = 'junegunn/fzf' build = './install --all' [[plugins]] repo = 'ryanoasis/vim-devicons' [[plugins]] repo = 'yuki-yano/fzf-preview.vim' rev = 'release/rpc' depends = ['fzf', 'vim-devicons'] on_cmd = [ 'FzfPreviewFromResourcesRpc', 'FzfPreviewGitStatusRpc', 'FzfPreviewBuffersRpc', 'FzfPreviewLinesRpc', 'FzfPreviewCtagsRpc', 'FzfPreviewBufferTagsRpc', 'FzfPreviewFromResourcesRpc', ] hook_add = ''' nmap [fuzzyf] map [fuzzyf] nnoremap [fuzzyf] :FzfPreviewFromResourcesRpc project_mru git nnoremap [fuzzyf] :FzfPreviewGitStatusRpc nnoremap [fuzzyf] :FzfPreviewBuffersRpc nnoremap [fuzzyf] :FzfPreviewLinesRpc --add-fzf-arg=--no-sort --add-fzf-arg=--query="'" nnoremap [fuzzyf] :FzfPreviewCtagsRpc nnoremap [fuzzyf] :FzfPreviewBufferTagsRpc nnoremap [fuzzyf] :FzfPreviewFromResourcesRpc buffer project_mru ''' hook_source = 'source ~/.vim/rc/plugins/fzf.rc.vim' ##################################################################### # Other Util ##################################################################### [[plugins]] repo = 'kannokanno/previm' depends = ['open-browser.vim'] on_cmd = ['PrevimOpen'] hook_add = ''' nnoremap p :PrevimOpen ''' [[plugins]] repo = 'tyru/open-browser.vim' on_map = ['(openbrowser-smart-search)'] hook_add = ''' let g:netrw_nogx = 1 " disable netrw's gx mapping. nmap bb (openbrowser-smart-search) vmap bb (openbrowser-smart-search) ''' [[plugins]] repo = 'tyru/open-browser-github.vim' depends = ['open-browser.vim'] on_cmd = ['OpenGithubFile'] hook_add = ''' nmap bh :OpenGithubFile vmap bh :OpenGithubFile ''' [[plugins]] repo = 'iberianpig/tig-explorer.vim' on_cmd = [ 'TigStatus', 'TigOpenCurrentFile', ] hook_add = ''' nnoremap s :TigStatus nnoremap k :TigOpenCurrentFile ''' [[plugins]] repo = 'rhysd/git-messenger.vim' on_cmd = ['GitMessenger'] hook_add = ''' let g:git_messenger_no_default_mappings = v:true nnoremap g :GitMessenger ''' [[plugins]] repo = 'junegunn/goyo.vim.git' on_ft = ['markdown'] hook_add = ''' function! s:goyo_enter() set noshowmode set noshowcmd set scrolloff=999 endfunction function! s:goyo_leave() set showmode set showcmd set scrolloff=5 endfunction augroup GoyoVisual autocmd! autocmd User GoyoEnter nested call goyo_enter() autocmd User GoyoLeave nested call goyo_leave() augroup END '''