Browse Source

swap out mkd, successfully...

Signed-off-by: yuexin <yuecn41@gmail.com>
Yue Xin 3 years ago
parent
commit
ef44c9e7fc
11 changed files with 47 additions and 47 deletions
  1. 5
    5
      Makefile
  2. 1
    1
      README.md
  3. 0
    0
      after/ftplugin/markdown.vim
  4. 0
    0
      ftdetect/markdown.vim
  5. 0
    0
      ftplugin/markdown.vim
  6. 3
    3
      indent/markdown.vim
  7. 7
    0
      registry/markdown.yaml
  8. 0
    7
      registry/mkd.yaml
  9. 0
    0
      syntax/markdown.vim
  10. 13
    13
      test/map.vader
  11. 18
    18
      test/syntax.vader

+ 5
- 5
Makefile View File

@@ -6,12 +6,12 @@ all:
6 6
 
7 7
 install:
8 8
 	mkdir -pv ${ADDONS}/ftdetect
9
-	cp -v ftdetect/mkd.vim ${ADDONS}/ftdetect/mkd.vim
9
+	cp -v ftdetect/markdown.vim ${ADDONS}/ftdetect/markdown.vim
10 10
 	mkdir -pv ${ADDONS}/ftplugin
11
-	cp -v ftplugin/mkd.vim ${ADDONS}/ftplugin/mkd.vim
11
+	cp -v ftplugin/markdown.vim ${ADDONS}/ftplugin/markdown.vim
12 12
 	mkdir -pv ${ADDONS}/syntax
13
-	cp -v syntax/mkd.vim ${ADDONS}/syntax/mkd.vim
13
+	cp -v syntax/markdown.vim ${ADDONS}/syntax/markdown.vim
14 14
 	mkdir -pv ${ADDONS}/after/ftplugin
15
-	cp -v after/ftplugin/mkd.vim ${ADDONS}/after/ftplugin/mkd.vim
15
+	cp -v after/ftplugin/markdown.vim ${ADDONS}/after/ftplugin/markdown.vim
16 16
 	mkdir -pv ${REGISTRY}
17
-	cp -v registry/mkd.yaml ${REGISTRY}/mkd.yaml
17
+	cp -v registry/markdown.yaml ${REGISTRY}/markdown.yaml

+ 1
- 1
README.md View File

@@ -42,7 +42,7 @@ To install without Pathogen using the Debian [vim-addon-manager](http://packages
42 42
 git clone https://github.com/plasticboy/vim-markdown.git
43 43
 cd vim-markdown
44 44
 sudo make install
45
-vim-addon-manager install mkd
45
+vim-addon-manager install markdown
46 46
 ```
47 47
 
48 48
 If you are not using any package manager, download the [tarball](https://github.com/plasticboy/vim-markdown/archive/master.tar.gz) and do this:

after/ftplugin/mkd.vim → after/ftplugin/markdown.vim View File


ftdetect/mkd.vim → ftdetect/markdown.vim View File


ftplugin/mkd.vim → ftplugin/markdown.vim View File


indent/mkd.vim → indent/markdown.vim View File

@@ -1,12 +1,12 @@
1 1
 if exists("b:did_indent") | finish | endif
2 2
 let b:did_indent = 1
3 3
 
4
-setlocal indentexpr=GetMkdIndent()
4
+setlocal indentexpr=GetMarkdownIndent()
5 5
 setlocal nolisp
6 6
 setlocal autoindent
7 7
 
8 8
 " Only define the function once
9
-if exists("*GetMkdIndent") | finish | endif
9
+if exists("*GetMarkdownIndent") | finish | endif
10 10
 
11 11
 function! s:is_li_start(line)
12 12
     return a:line !~ '^ *\([*-]\)\%( *\1\)\{2}\%( \|\1\)*$' &&
@@ -25,7 +25,7 @@ function! s:prevnonblank(lnum)
25 25
     return i
26 26
 endfunction
27 27
 
28
-function GetMkdIndent()
28
+function GetMarkdownIndent()
29 29
     let list_ind = 4
30 30
     " Find a non-blank line above the current line.
31 31
     let lnum = prevnonblank(v:lnum - 1)

+ 7
- 0
registry/markdown.yaml View File

@@ -0,0 +1,7 @@
1
+addon: markdown
2
+description: "Markdown syntax highlighting"
3
+files:
4
+  - ftdetect/markdown.vim
5
+  - ftplugin/markdown.vim
6
+  - syntax/markdown.vim
7
+  - after/ftplugin/markdown.vim

+ 0
- 7
registry/mkd.yaml View File

@@ -1,7 +0,0 @@
1
-addon: mkd
2
-description: "Markdown syntax highlighting"
3
-files:
4
-  - ftdetect/mkd.vim
5
-  - ftplugin/mkd.vim
6
-  - syntax/mkd.vim
7
-  - after/ftplugin/mkd.vim

syntax/mkd.vim → syntax/markdown.vim View File


+ 13
- 13
test/map.vader View File

@@ -1,46 +1,46 @@
1
-Given mkd;
1
+Given markdown;
2 2
 a <http://b> c
3 3
 
4 4
 Execute (gx autolink):
5 5
   let b:url = 'http://b'
6 6
   let b:line = getline(1)
7
-  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
7
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
8 8
   AssertEqual b:func(1, match(b:line, 'a') + 1), ''
9 9
   AssertEqual b:func(1, match(b:line, '<') + 1), b:url
10 10
   AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
11 11
   AssertEqual b:func(1, match(b:line, '>') + 1), b:url
12 12
   AssertEqual b:func(1, match(b:line, 'c') + 1), ''
13 13
 
14
-Given mkd;
14
+Given markdown;
15 15
 a http://b.bb c
16 16
 
17 17
 Execute (gx implicit autolink):
18 18
   let b:url = 'http://b.bb'
19 19
   let b:line = getline(1)
20
-  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
20
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
21 21
   AssertEqual b:func(1, match(b:line, 'a') + 1), ''
22 22
   AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
23 23
   AssertEqual b:func(1, match(b:line, 'c') + 1), ''
24 24
 
25
-Given mkd;
25
+Given markdown;
26 26
 [a]: http://b "c"
27 27
 
28 28
 Execute (gx link reference definition):
29 29
   let b:url = 'http://b'
30 30
   let b:line = getline(1)
31
-  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
31
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
32 32
   " TODO would be cool if all of the following gave the link.
33 33
   AssertEqual b:func(1, match(b:line, 'a') + 1), ''
34 34
   AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
35 35
   AssertEqual b:func(1, match(b:line, 'c') + 1), ''
36 36
 
37
-Given mkd;
37
+Given markdown;
38 38
 a [b](c) d
39 39
 
40 40
 Execute (gx autolink):
41 41
   let b:url = 'c'
42 42
   let b:line = getline(1)
43
-  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
43
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
44 44
   AssertEqual b:func(1, match(b:line, 'a') + 1), ''
45 45
   AssertEqual b:func(1, match(b:line, '[') + 1), b:url
46 46
   AssertEqual b:func(1, match(b:line, 'b') + 1), b:url
@@ -50,7 +50,7 @@ Execute (gx autolink):
50 50
   AssertEqual b:func(1, match(b:line, ')') + 1), b:url
51 51
   AssertEqual b:func(1, match(b:line, 'd') + 1), ''
52 52
 
53
-Given mkd;
53
+Given markdown;
54 54
 # a
55 55
 
56 56
 b
@@ -66,7 +66,7 @@ Execute (]] same level):
66 66
   normal [[
67 67
   AssertEqual line('.'), 1
68 68
 
69
-Given mkd;
69
+Given markdown;
70 70
 # a
71 71
 
72 72
 b
@@ -82,7 +82,7 @@ Execute (]] different levels level):
82 82
   normal [[
83 83
   AssertEqual line('.'), 1
84 84
 
85
-Given mkd;
85
+Given markdown;
86 86
 # a
87 87
 
88 88
 b
@@ -102,7 +102,7 @@ Execute (][ different levels level):
102 102
   normal []
103 103
   AssertEqual line('.'), 1
104 104
 
105
-Given mkd;
105
+Given markdown;
106 106
 # a
107 107
 
108 108
 b
@@ -113,7 +113,7 @@ Execute (]c):
113 113
   normal ]c
114 114
   AssertEqual line('.'), 1
115 115
 
116
-Given mkd;
116
+Given markdown;
117 117
 # a
118 118
 
119 119
 Execute (Toc does not set nomodifiable on other files):

+ 18
- 18
test/syntax.vader View File

@@ -1,4 +1,4 @@
1
-Given mkd;
1
+Given markdown;
2 2
 a **b** c
3 3
 
4 4
 Execute (bold):
@@ -6,7 +6,7 @@ Execute (bold):
6 6
   AssertEqual SyntaxOf('b'), 'htmlBold'
7 7
   AssertNotEqual SyntaxOf('c'), 'htmlBold'
8 8
 
9
-Given mkd;
9
+Given markdown;
10 10
 a *b* c
11 11
 
12 12
 Execute (italic):
@@ -16,14 +16,14 @@ Execute (italic):
16 16
 
17 17
 # Links
18 18
 
19
-Given mkd;
19
+Given markdown;
20 20
 [a](b)
21 21
 
22 22
 Execute (link with title):
23 23
   AssertEqual SyntaxOf('a'), 'mkdLink'
24 24
   AssertEqual SyntaxOf('b'), 'mkdURL'
25 25
 
26
-Given mkd;
26
+Given markdown;
27 27
 (a)
28 28
 
29 29
 (b)
@@ -32,7 +32,7 @@ Execute (parenthesis not in link):
32 32
   AssertNotEqual SyntaxOf('a'), 'mkdURL'
33 33
   AssertNotEqual SyntaxOf('b'), 'mkdURL'
34 34
 
35
-Given mkd;
35
+Given markdown;
36 36
 [a](b) c [d](e)
37 37
 
38 38
 Execute (multiple links on a line):
@@ -40,7 +40,7 @@ Execute (multiple links on a line):
40 40
 
41 41
 # Autolinks
42 42
 
43
-Given mkd;
43
+Given markdown;
44 44
 a <http://b> c
45 45
 
46 46
 Execute (autolink):
@@ -50,25 +50,25 @@ Execute (autolink):
50 50
   AssertEqual SyntaxOf('>'), 'mkdDelimiter'
51 51
   AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
52 52
 
53
-Given mkd;
53
+Given markdown;
54 54
 <HtTp://a>
55 55
 
56 56
 Execute (autolink with scheme case is insensitive):
57 57
   AssertEqual SyntaxOf('a'), 'mkdInlineURL'
58 58
 
59
-Given mkd;
59
+Given markdown;
60 60
 <notascheme://a>
61 61
 
62 62
 Execute (autolink without known scheme is not a link):
63 63
   AssertNotEqual SyntaxOf('n'), 'mkdInlineURL'
64 64
 
65
-Given mkd;
65
+Given markdown;
66 66
 <a>
67 67
 
68 68
 Execute (autolink without scheme is not a link):
69 69
   AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
70 70
 
71
-Given mkd;
71
+Given markdown;
72 72
 < http://a >
73 73
 <http://b c>
74 74
 <http://d
@@ -81,7 +81,7 @@ Execute (autolink with space is not a link):
81 81
   AssertNotEqual SyntaxOf('d'), 'mkdInlineURL'
82 82
   AssertNotEqual SyntaxOf('e'), 'mkdInlineURL'
83 83
 
84
-Given mkd;
84
+Given markdown;
85 85
 \<http://a>
86 86
 
87 87
 Execute (autolinks can be backslash escaped):
@@ -89,7 +89,7 @@ Execute (autolinks can be backslash escaped):
89 89
 
90 90
 # Code Blocks
91 91
 
92
-Given mkd;
92
+Given markdown;
93 93
 ~~~
94 94
 code
95 95
 ~~~
@@ -97,7 +97,7 @@ code
97 97
 Execute (code blocks can be fenced with tildes):
98 98
   AssertEqual SyntaxOf('c'), 'mkdCode'
99 99
 
100
-Given mkd;
100
+Given markdown;
101 101
 ~~~ruby
102 102
 code
103 103
 ~~~
@@ -107,7 +107,7 @@ Execute (code blocks can have a language specifier):
107 107
 
108 108
 # Math
109 109
 
110
-Given mkd;
110
+Given markdown;
111 111
 a $x$ b
112 112
 c $$y$$ d
113 113
 \$e\$
@@ -131,7 +131,7 @@ Execute (math):
131 131
   AssertNotEqual SyntaxOf('x'), 'mkdMath'
132 132
   AssertNotEqual SyntaxOf('y'), 'mkdMath'
133 133
 
134
-Given mkd;
134
+Given markdown;
135 135
 a
136 136
 
137 137
 $
@@ -149,7 +149,7 @@ Execute (multiline math):
149 149
 
150 150
 # YAML frontmatter
151 151
 
152
-Given mkd;
152
+Given markdown;
153 153
 ---
154 154
 a: b
155 155
 ---
@@ -163,7 +163,7 @@ Execute (YAML frontmatter is controlled by the option):
163 163
   syn off | syn on
164 164
   AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
165 165
 
166
-Given mkd;
166
+Given markdown;
167 167
 
168 168
 ---
169 169
 a: b
@@ -174,7 +174,7 @@ Execute (YAML frontmatter only works if it's the first thing in the file):
174 174
   syn off | syn on
175 175
   AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
176 176
 
177
-Given mkd;
177
+Given markdown;
178 178
 ---
179 179
 a: b
180 180
 ---

Loading…
Cancel
Save