commit 95d582693fb0fe62e8e8e4e3aae560e157fb3d24
parent 88a0584cf29dfa18d9e5b04febdea8eb8f40ed39
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Mon, 27 Jan 2020 23:59:51 +0100
vim: add more undo points in markdown files
Former-commit-id: 6be7bd4d4a5e9eb6e11fec5ca9b5b1484cc153a4
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
@@ -5,6 +5,13 @@ inoremap <buffer> ;3 ###
inoremap <buffer> ;4 ####
inoremap <buffer> ;5 #####
inoremap <buffer> ;6 ######
+
+" Add an undo point at punctuation
+inoremap <buffer> . .<c-g>u
+inoremap <buffer> ? ?<c-g>u
+inoremap <buffer> ! !<c-g>u
+inoremap <buffer> , ,<c-g>u
+
nnoremap <buffer> <leader><CR> :silent !open "%<.pdf"<CR>:redraw!<CR>
" Autocommands