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:
@@ -5,3 +5,5 @@
|
||||
- Updated :
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
2
.vimrc
2
.vimrc
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user