@@ -62,8 +62,8 @@ if !exists('g:pencil#autoformat')
62
62
en
63
63
64
64
if ! exists (' g:pencil#autoformat_config' )
65
- " do not engage autoformat if cursor is inside any of
66
- " the following syntax groups
65
+ " Do not activate autoformat if entering Insert mode when
66
+ " the cursor is inside any of the following syntax groups.
67
67
"
68
68
" markdown* (tpope/vim-markdown)
69
69
" mkd*, htmlH[0-9] (plasticboy/vim-markdown)
@@ -74,29 +74,16 @@ if !exists('g:pencil#autoformat_config')
74
74
let g: pencil #autoformat_config = {
75
75
\ ' markdown' : {
76
76
\ ' black' : [
77
- \ ' markdown(Code|H[0-9]|Url|IdDeclaration|Link|Rule|Highlight[A-Za-z0-9]+)' ,
78
77
\ ' htmlH[0-9]' ,
78
+ \ ' markdown(Code|H[0-9]|Url|IdDeclaration|Link|Rule|Highlight[A-Za-z0-9]+)' ,
79
79
\ ' markdown(FencedCodeBlock|InlineCode)' ,
80
+ \ ' mkd(Code|Rule|Delimiter|Link|ListItem|IndentCode)' ,
80
81
\ ' mmdTable[A-Za-z0-9]*' ,
81
82
\ ],
82
83
\ ' white' : [
83
84
\ ' markdown(Code|Link)' ,
84
85
\ ],
85
86
\ },
86
- \ ' mkd' : {
87
- \ ' black' : [
88
- \ ' mkd(Code|Rule|Delimiter|Link|ListItem|IndentCode)' ,
89
- \ ' htmlH[0-9]' ,
90
- \ ' mmdTable[A-Za-z0-9]*' ,
91
- \ ],
92
- \ },
93
- \ ' tex' : {
94
- \ ' black' : [
95
- \ ' tex(BeginEndName|Delimiter|DocType|InputFile|Math|RefZone|Title)' ,
96
- \ ' texSection$' ,
97
- \ ],
98
- \ ' enforce-previous-line' : 1 ,
99
- \ },
100
87
\ ' asciidoc' : {
101
88
\ ' black' : [
102
89
\ ' asciidoc(AttributeList|AttributeEntry|ListLabel|Literal|SideBar|Source|Sect[0-9])' ,
@@ -112,13 +99,28 @@ if !exists('g:pencil#autoformat_config')
112
99
\ ' rst(CodeBlock|Directive|LiteralBlock|Sections)' ,
113
100
\ ],
114
101
\ },
102
+ \ ' tex' : {
103
+ \ ' black' : [
104
+ \ ' tex(BeginEndName|Delimiter|DocType|InputFile|Math|RefZone|Title)' ,
105
+ \ ' texSection$' ,
106
+ \ ],
107
+ \ ' enforce-previous-line' : 1 ,
108
+ \ },
115
109
\ ' textile' : {
116
110
\ ' black' : [
117
111
\ ' txtCode' ,
118
112
\ ],
119
113
\ },
120
114
\ }
121
115
en
116
+ if ! exists (' g:pencil#autoformat_aliases' )
117
+ " Aliases used exclusively for autoformat config.
118
+ " Pencil will NOT modify the filetype setting.
119
+ let g: pencil #autoformat_aliases = {
120
+ \ ' md' : ' markdown' ,
121
+ \ ' mkd' : ' markdown' ,
122
+ \ }
123
+ en
122
124
123
125
if ! exists (' g:pencil#joinspaces' )
124
126
" by default, only one space after full stop (.)
0 commit comments