hook_add = ''' let g:python_highlight_all = v:true let g:awk_is_gawk = v:true let g:is_bash = v:true let g:rust_bang_comment_leader = v:true let g:markdown_fenced_languages = ['ts=typescript'] let g:vim_indent_cont = 6 let g:vimsyn_embed = 'lP' let g:vimsyn_noerror = v:true let g:loaded_2html_plugin = v:true let g:loaded_getscript = v:true let g:loaded_getscriptPlugin = v:true let g:loaded_gzip = v:true let g:loaded_gtags = v:true let g:loaded_gtags_cscope = v:true let g:loaded_logiPat = v:true let g:loaded_man = v:true let g:loaded_matchit = v:true let g:loaded_matchparen = v:true let g:loaded_netrw = v:true let g:loaded_netrwFileHandlers = v:true let g:loaded_netrwPlugin = v:true let g:loaded_netrwSettings = v:true let g:loaded_rrhelper = v:true let g:loaded_shada_plugin = v:true let g:loaded_spellfile_plugin = v:true let g:loaded_sql_completion = v:true let g:loaded_syntax_completion = v:true let g:loaded_tar = v:true let g:loaded_tarPlugin = v:true let g:loaded_tutor_mode_plugin = v:true let g:loaded_vimball = v:true let g:loaded_vimballPlugin = v:true let g:loaded_zip = v:true let g:loaded_zipPlugin = v:true ''' [ftplugin] _ = ''' setlocal formatoptions-=r setlocal formatoptions-=o setlocal formatoptions+=mMBl ''' dockerfile = ''' function! s:set_abbrev(instruction) abort execute 'inoreabbrev ' a:instruction \ printf("(getline('.')[:col('.') - 2] ==# '%s')", a:instruction) \ printf("? '%s' : '%s'", toupper(a:instruction), a:instruction) endfunction call s:set_abbrev('add') call s:set_abbrev('arg') call s:set_abbrev('cmd') call s:set_abbrev('copy') call s:set_abbrev('entrypoint') call s:set_abbrev('env') call s:set_abbrev('expose') call s:set_abbrev('from') call s:set_abbrev('healthcheck') call s:set_abbrev('label') call s:set_abbrev('onbuild') call s:set_abbrev('run') call s:set_abbrev('shell') call s:set_abbrev('user') call s:set_abbrev('volume') call s:set_abbrev('workdir') inoreabbrev as \ (getline('.')[:col('.') - 2] =~# '^FROM\s\+.*\s\+') ? 'AS' : 'as' ''' gitcommit = ''' setlocal textwidth=72 colorcolumn=+1 " based on https://zenn.dev/uochan/articles/2021-12-08-vim-conventional-commits function! s:select_type() abort let title = printf('%s: ', trim(split(getline('.'), ';')[0])) silent! normal! "_dip silent! put! =title silent! startinsert! endfunction nnoremap call select_type() ''' gitrebase = ''' nnoremap Cycle ''' help = ''' nnoremap q q nnoremap zv xnoremap zv nnoremap [Toggle]l \ printf('help %s@%s', expand(''), \ expand('%:e') ==# 'jax' ? 'en': 'ja') let s:tag_pattern = join([ \ '\\\@', '<[SCM]-.>', \ 'CTRL-.', 'CTRL-SHIFT-.', 'CTRL-Break', 'CTRL-PageUp', 'CTRL-PageDown', \ 'CTRL-Insert', 'CTRL-Del', 'CTRL-{char}', \ ], '\|') function! s:move_link(dir, count) abort for cnt in range(a:count) let flags = (a:dir ? '' : 'b') .. 'W' call search(s:tag_pattern, flags, 0, 500) endfor endfunction nnoremap call move_link(1, v:count1) nnoremap call move_link(0, v:count1) ''' python = ''' setlocal softtabstop=4 shiftwidth=4 setlocal textwidth=80 setlocal smarttab nosmartindent inoreabbrev improt \ (getline('.')[:col('.') - 2] =~# 'from\s\+.*\s\+' \ getline('.')[:col('.') - 2] ==# 'improt') \ ? 'import' : 'improt' ''' qf = ''' setlocal nowrap nolist setlocal numberwidth=2 nnoremap q getwininfo(win_getid())[0].loclist \ ? 'lclose' \ : 'cclose' " based on https://github.com/kuuote/dotvim/blob/9c7ba6307c/ftplugin/qf.vim#L1 nnoremap j (line('.') == line('$') ? 'gg' : 'j') .. 'zzp' nnoremap k (line('.') == 1 ? 'G' : 'k') .. 'zzp' " from https://github.com/mityu/dotfiles/blob/f5cb5f9a92/dot_vim/runtime/ftplugin/qf.vim#L6 nnoremap o zzp nnoremap p zzp ''' toml = ''' if !has('nvim') && !empty(filter(getline(1, 4), \ { _, val -> val =~# '\V\^\([[plugins]]\|hook_\)' })) call dein#toml#syntax() endif ''' zsh = ''' setlocal iskeyword+=- ''' checkhealth = ''' nnoremap q q ''' go = ''' setlocal noexpandtab nosmarttab shiftwidth=0 ''' tsv = ''' setlocal noexpandtab ''' vim = ''' setlocal formatoptions-=ro textwidth=0 ''' [[plugins]] repo = '4513echo/vim-jq_indent' [[plugins]] repo = 'bfrg/vim-jq' merge_ftdetect = true [[plugins]] repo = 'cohama/vim-hier' lazy = true on_cmd = ['HierClean', 'HierStart', 'HierStop', 'HierUpdate'] on_ft = 'qf' [plugins.ftplugin] qf = ''' autocmd vimrc WinClosed \ : if &buftype ==# 'quickfix' \ | execute 'HierStop' \ | endif ''' [[plugins]] repo = 'Fymyte/rasi.vim' merge_ftdetect = true [plugins.ftplugin] rasi = ''' setlocal shiftwidth=4 indentkeys=0{,0},o,O ''' [[plugins]] repo = 'lark-parser/vim-lark-syntax' merge_ftdetect = true [[plugins]] repo = 'lifepillar/pgsql.vim' merge_ftdetect = true hook_add = ''' let g:sql_type_default = 'pgsql' ''' [[plugins]] repo = 'MTDL9/vim-log-highlighting' merge_ftdetect = true [[plugins]] repo = 'rbtnn/vim-vimscript_indentexpr' [[plugins]] repo = 'syusui-s/scrapbox-vim' merge_ftdetect = true [[plugins]] repo = 'thinca/vim-qfreplace' lazy = true on_cmd = 'Qfreplace' [plugins.ftplugin] qf = ''' nnoremap r Qfreplace ''' qfreplace = ''' nnoremap q q ''' [[plugins]] repo = 'tmux-plugins/vim-tmux' merge_ftdetect = true [[plugins]] repo = 'tpope/vim-git' merge_ftdetect = true [[plugins]] repo = 'vim-skk/skkdict.vim' merge_ftdetect = true