aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-23 09:04:54 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-23 09:04:54 +1200
commitcef0c0c0569c6d566a7671fe47a6e9fa706fcb4a (patch)
tree372cc4aae93a9331ce9b010972e9059577ecc4d8 /vim
parent58b20c9f303a94108b2fecc007d02f53aab5d2e7 (diff)
downloaddotfiles-cef0c0c0569c6d566a7671fe47a6e9fa706fcb4a.tar.gz
Define user command MarkdownHeading
Diffstat (limited to 'vim')
-rw-r--r--vim/after/ftplugin/markdown.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
index 6634924e..4c07756f 100644
--- a/vim/after/ftplugin/markdown.vim
+++ b/vim/after/ftplugin/markdown.vim
@@ -33,7 +33,9 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
\ . '|xunmap <buffer> <LocalLeader>Q'
" Autoformat headings
+command! -buffer -nargs=1 MarkdownHeading
+ \ call markdown#Heading(<f-args>)
nnoremap <buffer> <LocalLeader>-
- \ :<C-U>call markdown#Heading('-')<CR>
+ \ :<C-U>MarkdownHeading -<CR>
nnoremap <buffer> <LocalLeader>=
- \ :<C-U>call markdown#Heading('=')<CR>
+ \ :<C-U>MarkdownHeading =<CR>