diff options
| author | nsfisis <nsfisis@gmail.com> | 2021-11-15 22:54:15 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2021-11-15 23:09:52 +0900 |
| commit | 3488dd64d5462c6e06ceae6337e7e6fa6dbb20f7 (patch) | |
| tree | b79f4775b983334f1e102e67a36c8291de598661 | |
| parent | 9d46d234de3ac2d5c754932375e0cfe79b436939 (diff) | |
| download | dotfiles-3488dd64d5462c6e06ceae6337e7e6fa6dbb20f7.tar.gz dotfiles-3488dd64d5462c6e06ceae6337e7e6fa6dbb20f7.tar.zst dotfiles-3488dd64d5462c6e06ceae6337e7e6fa6dbb20f7.zip | |
vim: lazily load :Man
| -rw-r--r-- | .vimrc | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -1185,6 +1185,22 @@ command! -bar -range=% \ keeppatterns <line1>,<line2>g/^/m<line1>-1 +function! s:dummy_man_command(mods, args) abort + " Delete the dummy command. + delcommand Man + " Load man.vim which defines |:Man|. + runtime ftplugin/man.vim + " Pass the given arguments to it. + execute printf("%s Man %s", a:mods, a:args) +endfunction + + +" To shorten Vim startup, lazily load ftplugin/man.vim. +command! -complete=shellcmd -nargs=+ + \ Man + \ call s:dummy_man_command(<q-mods>, <f-args>) + + " ftplugin {{{1 @@ -1249,12 +1265,6 @@ ColorScheme! ocean " Plugins configuration {{{1 -" Load builtin plugins. {{{2 - -" :help :Man -runtime ftplugin/man.vim - - " Disable standard plugins. {{{2 let g:loaded_2html_plugin = 1 |
