Permalink
Browse files

swap out mkd, successfully...

Signed-off-by: yuexin <yuecn41@gmail.com>
  • Loading branch information...
1 parent e5af33f commit ef44c9e7fc839bec7bb17f8264442912f38c903c @yuex yuex committed with yuex Aug 16, 2015
View
@@ -6,12 +6,12 @@ all:
install:
mkdir -pv ${ADDONS}/ftdetect
- cp -v ftdetect/mkd.vim ${ADDONS}/ftdetect/mkd.vim
+ cp -v ftdetect/markdown.vim ${ADDONS}/ftdetect/markdown.vim
mkdir -pv ${ADDONS}/ftplugin
- cp -v ftplugin/mkd.vim ${ADDONS}/ftplugin/mkd.vim
+ cp -v ftplugin/markdown.vim ${ADDONS}/ftplugin/markdown.vim
mkdir -pv ${ADDONS}/syntax
- cp -v syntax/mkd.vim ${ADDONS}/syntax/mkd.vim
+ cp -v syntax/markdown.vim ${ADDONS}/syntax/markdown.vim
mkdir -pv ${ADDONS}/after/ftplugin
- cp -v after/ftplugin/mkd.vim ${ADDONS}/after/ftplugin/mkd.vim
+ cp -v after/ftplugin/markdown.vim ${ADDONS}/after/ftplugin/markdown.vim
mkdir -pv ${REGISTRY}
- cp -v registry/mkd.yaml ${REGISTRY}/mkd.yaml
+ cp -v registry/markdown.yaml ${REGISTRY}/markdown.yaml
View
@@ -42,7 +42,7 @@ To install without Pathogen using the Debian [vim-addon-manager](http://packages
git clone https://github.com/plasticboy/vim-markdown.git
cd vim-markdown
sudo make install
-vim-addon-manager install mkd
+vim-addon-manager install markdown
```
If you are not using any package manager, download the [tarball](https://github.com/plasticboy/vim-markdown/archive/master.tar.gz) and do this:
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,12 +1,12 @@
if exists("b:did_indent") | finish | endif
let b:did_indent = 1
-setlocal indentexpr=GetMkdIndent()
+setlocal indentexpr=GetMarkdownIndent()
setlocal nolisp
setlocal autoindent
" Only define the function once
-if exists("*GetMkdIndent") | finish | endif
+if exists("*GetMarkdownIndent") | finish | endif
function! s:is_li_start(line)
return a:line !~ '^ *\([*-]\)\%( *\1\)\{2}\%( \|\1\)*$' &&
@@ -25,7 +25,7 @@ function! s:prevnonblank(lnum)
return i
endfunction
-function GetMkdIndent()
+function GetMarkdownIndent()
let list_ind = 4
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
@@ -0,0 +1,7 @@
+addon: markdown
+description: "Markdown syntax highlighting"
+files:
+ - ftdetect/markdown.vim
+ - ftplugin/markdown.vim
+ - syntax/markdown.vim
+ - after/ftplugin/markdown.vim
View
@@ -1,7 +0,0 @@
-addon: mkd
-description: "Markdown syntax highlighting"
-files:
- - ftdetect/mkd.vim
- - ftplugin/mkd.vim
- - syntax/mkd.vim
- - after/ftplugin/mkd.vim
File renamed without changes.
View
@@ -1,46 +1,46 @@
-Given mkd;
+Given markdown;
a <http://b> c
Execute (gx autolink):
let b:url = 'http://b'
let b:line = getline(1)
- let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
+ let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
AssertEqual b:func(1, match(b:line, 'a') + 1), ''
AssertEqual b:func(1, match(b:line, '<') + 1), b:url
AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
AssertEqual b:func(1, match(b:line, '>') + 1), b:url
AssertEqual b:func(1, match(b:line, 'c') + 1), ''
-Given mkd;
+Given markdown;
a http://b.bb c
Execute (gx implicit autolink):
let b:url = 'http://b.bb'
let b:line = getline(1)
- let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
+ let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
AssertEqual b:func(1, match(b:line, 'a') + 1), ''
AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
AssertEqual b:func(1, match(b:line, 'c') + 1), ''
-Given mkd;
+Given markdown;
[a]: http://b "c"
Execute (gx link reference definition):
let b:url = 'http://b'
let b:line = getline(1)
- let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
+ let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
" TODO would be cool if all of the following gave the link.
AssertEqual b:func(1, match(b:line, 'a') + 1), ''
AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
AssertEqual b:func(1, match(b:line, 'c') + 1), ''
-Given mkd;
+Given markdown;
a [b](c) d
Execute (gx autolink):
let b:url = 'c'
let b:line = getline(1)
- let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
+ let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_GetUrlForPosition')
AssertEqual b:func(1, match(b:line, 'a') + 1), ''
AssertEqual b:func(1, match(b:line, '[') + 1), b:url
AssertEqual b:func(1, match(b:line, 'b') + 1), b:url
@@ -50,7 +50,7 @@ Execute (gx autolink):
AssertEqual b:func(1, match(b:line, ')') + 1), b:url
AssertEqual b:func(1, match(b:line, 'd') + 1), ''
-Given mkd;
+Given markdown;
# a
b
@@ -66,7 +66,7 @@ Execute (]] same level):
normal [[
AssertEqual line('.'), 1
-Given mkd;
+Given markdown;
# a
b
@@ -82,7 +82,7 @@ Execute (]] different levels level):
normal [[
AssertEqual line('.'), 1
-Given mkd;
+Given markdown;
# a
b
@@ -102,7 +102,7 @@ Execute (][ different levels level):
normal []
AssertEqual line('.'), 1
-Given mkd;
+Given markdown;
# a
b
@@ -113,7 +113,7 @@ Execute (]c):
normal ]c
AssertEqual line('.'), 1
-Given mkd;
+Given markdown;
# a
Execute (Toc does not set nomodifiable on other files):
View
@@ -1,12 +1,12 @@
-Given mkd;
+Given markdown;
a **b** c
Execute (bold):
AssertNotEqual SyntaxOf('a'), 'htmlBold'
AssertEqual SyntaxOf('b'), 'htmlBold'
AssertNotEqual SyntaxOf('c'), 'htmlBold'
-Given mkd;
+Given markdown;
a *b* c
Execute (italic):
@@ -16,14 +16,14 @@ Execute (italic):
# Links
-Given mkd;
+Given markdown;
[a](b)
Execute (link with title):
AssertEqual SyntaxOf('a'), 'mkdLink'
AssertEqual SyntaxOf('b'), 'mkdURL'
-Given mkd;
+Given markdown;
(a)
(b)
@@ -32,15 +32,15 @@ Execute (parenthesis not in link):
AssertNotEqual SyntaxOf('a'), 'mkdURL'
AssertNotEqual SyntaxOf('b'), 'mkdURL'
-Given mkd;
+Given markdown;
[a](b) c [d](e)
Execute (multiple links on a line):
AssertEqual SyntaxOf('c'), ''
# Autolinks
-Given mkd;
+Given markdown;
a <http://b> c
Execute (autolink):
@@ -50,25 +50,25 @@ Execute (autolink):
AssertEqual SyntaxOf('>'), 'mkdDelimiter'
AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
-Given mkd;
+Given markdown;
<HtTp://a>
Execute (autolink with scheme case is insensitive):
AssertEqual SyntaxOf('a'), 'mkdInlineURL'
-Given mkd;
+Given markdown;
<notascheme://a>
Execute (autolink without known scheme is not a link):
AssertNotEqual SyntaxOf('n'), 'mkdInlineURL'
-Given mkd;
+Given markdown;
<a>
Execute (autolink without scheme is not a link):
AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
-Given mkd;
+Given markdown;
< http://a >
<http://b c>
<http://d
@@ -81,23 +81,23 @@ Execute (autolink with space is not a link):
AssertNotEqual SyntaxOf('d'), 'mkdInlineURL'
AssertNotEqual SyntaxOf('e'), 'mkdInlineURL'
-Given mkd;
+Given markdown;
\<http://a>
Execute (autolinks can be backslash escaped):
AssertNotEqual SyntaxOf('<'), 'mkdDelimiter'
# Code Blocks
-Given mkd;
+Given markdown;
~~~
code
~~~
Execute (code blocks can be fenced with tildes):
AssertEqual SyntaxOf('c'), 'mkdCode'
-Given mkd;
+Given markdown;
~~~ruby
code
~~~
@@ -107,7 +107,7 @@ Execute (code blocks can have a language specifier):
# Math
-Given mkd;
+Given markdown;
a $x$ b
c $$y$$ d
\$e\$
@@ -131,7 +131,7 @@ Execute (math):
AssertNotEqual SyntaxOf('x'), 'mkdMath'
AssertNotEqual SyntaxOf('y'), 'mkdMath'
-Given mkd;
+Given markdown;
a
$
@@ -149,7 +149,7 @@ Execute (multiline math):
# YAML frontmatter
-Given mkd;
+Given markdown;
---
a: b
---
@@ -163,7 +163,7 @@ Execute (YAML frontmatter is controlled by the option):
syn off | syn on
AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
-Given mkd;
+Given markdown;
---
a: b
@@ -174,7 +174,7 @@ Execute (YAML frontmatter only works if it's the first thing in the file):
syn off | syn on
AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
-Given mkd;
+Given markdown;
---
a: b
---

0 comments on commit ef44c9e

Please sign in to comment.