aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-23 09:25:27 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-23 09:25:27 +1200
commit6137c1862514e496071d553d583fc11378733833 (patch)
treee17e1dce5029fb803f18fceb90569b660559e667 /vim
parent6b0187101c6f7c293713271402eaeb96d701c39d (diff)
downloaddotfiles-6137c1862514e496071d553d583fc11378733833.tar.gz
Refactor undo_ftplugin lines for Markdown ftplugin
Diffstat (limited to 'vim')
-rw-r--r--vim/ftplugin/markdown.vim8
1 files changed, 2 insertions, 6 deletions
diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim
index d2903287..7c757383 100644
--- a/vim/ftplugin/markdown.vim
+++ b/vim/ftplugin/markdown.vim
@@ -7,18 +7,14 @@ let b:did_ftplugin = 1
" Specify format for comments (lists, quotes)
setlocal comments=fb:*,fb:-,fb:+,n:>
setlocal commentstring=>\ %s
+let b:undo_ftplugin .= '|setlocal comments< commentstring<'
" Specify format options
setlocal formatoptions+=tcqln
setlocal formatoptions-=o
setlocal formatoptions-=r
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:
-
-if exists('b:undo_ftplugin')
- let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
-else
- let b:undo_ftplugin = "setl cms< com< fo< flp<"
-endif
+let b:undo_ftplugin .= '|setlocal formatoptions< formatlistpat<'
function! MarkdownFold()
let line = getline(v:lnum)