Markdown header snippet

I made a shortcut to include a Markdown header on an existing file
by `,md` in normal mode.  This will insert the `,md` template and update
the title with the filename (minus extension)
This commit is contained in:
2024-02-25 18:26:08 -05:00
parent 993d717dfa
commit 945f805543
2 changed files with 3 additions and 1 deletions

View File

@@ -5,3 +5,5 @@
- Updated :
---

2
.vimrc
View File

@@ -325,7 +325,7 @@ nnoremap ,begend :-1read $HOME/.vim/templates/begend<CR>jA
"nnoremap ,sh :-1read $HOME/.vim/templates/sh<CR>jA
" section markdown file header
nnoremap ,md :-1read $HOME/.vim/templates/md<CR>jA
nnoremap ,md :0read $HOME/.vim/templates/md<CR> <bar> :1<CR>dd <bar> :%s/title/\=expand('%:t:r')/g<CR>
" ---------------------------------------------------------------------------------------------------------------------
" ==> NetrwTreeListing readonly fix (https://vi.stackexchange.com/a/13012)