|
|
|
@@ -107,6 +107,11 @@ Plug 'dense-analysis/ale'
|
|
|
|
|
Plug 'godlygeek/tabular'
|
|
|
|
|
Plug 'preservim/vim-markdown'
|
|
|
|
|
|
|
|
|
|
" Vim Spellsync
|
|
|
|
|
" Magically rebuild Vim spell files if word lists are modified outside of Vim
|
|
|
|
|
" https://github.com/micarmst/vim-spellsync
|
|
|
|
|
Plug 'micarmst/vim-spellsync'
|
|
|
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
@@ -284,6 +289,28 @@ hi clear SpellRare
|
|
|
|
|
hi SpellBad cterm=underline ctermbg=black ctermfg=red
|
|
|
|
|
hi SpellCap cterm=underline ctermbg=black ctermfg=red
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
" ==> Templates: markdown documents (.md)
|
|
|
|
|
|
|
|
|
|
autocmd BufNewFile *.md so $HOME/.vim/templates/md
|
|
|
|
|
autocmd BufNewFile *.md %s/title/\=expand('%:t:r')/g
|
|
|
|
|
autocmd BufNewFile *.md exe "g/^- Created :.*/s//- Created : " .strftime("%Y-%m-%d")
|
|
|
|
|
autocmd BufNewFile *.md exe "normal Go"
|
|
|
|
|
autocmd BufWritePre,filewritepre *.md execute "normal ma"
|
|
|
|
|
autocmd BufWritePre,filewritepre *.md exe "g/^- Updated :.*/s//- Updated : " .strftime("%Y-%m-%d %H:%M")
|
|
|
|
|
autocmd bufWritePost,filewritepost *.md execute "normal `a"
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
" ==> Templates: shell scripts (.sh)
|
|
|
|
|
|
|
|
|
|
autocmd BufNewFile *.sh so $HOME/.vim/templates/sh
|
|
|
|
|
autocmd BufNewFile *.sh %s/FILE:.*/\='FILE: '.expand('%:t:r')/e
|
|
|
|
|
autocmd BufNewFile *.sh exe "g/CREATED:.*/s//CREATED: " .strftime("%c")
|
|
|
|
|
autocmd BufNewFile *.sh exe "normal Go"
|
|
|
|
|
autocmd BufWritePre,filewritepre *.sh execute "normal ma"
|
|
|
|
|
autocmd BufWritePre,filewritepre *.sh exe "g/UPDATED:.*/s//UPDATED: " .strftime("%c")
|
|
|
|
|
autocmd bufWritePost,filewritepost *.sh execute "normal `a"
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
" ==> Snippets
|
|
|
|
|
" Pasting pre-made things
|
|
|
|
@@ -295,7 +322,7 @@ nnoremap ,ban :-1read $HOME/.vim/templates/banner<CR>jA
|
|
|
|
|
nnoremap ,begend :-1read $HOME/.vim/templates/begend<CR>jA
|
|
|
|
|
|
|
|
|
|
" section shell script header
|
|
|
|
|
nnoremap ,sh :-1read $HOME/.vim/templates/sh<CR>jA
|
|
|
|
|
"nnoremap ,sh :-1read $HOME/.vim/templates/sh<CR>jA
|
|
|
|
|
|
|
|
|
|
" section markdown file header
|
|
|
|
|
nnoremap ,md :-1read $HOME/.vim/templates/md<CR>jA
|
|
|
|
|