From 6137c1862514e496071d553d583fc11378733833 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 23 May 2019 09:25:27 +1200 Subject: Refactor undo_ftplugin lines for Markdown ftplugin --- vim/ftplugin/markdown.vim | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'vim') 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) -- cgit v1.2.3