├── .gitignore ├── Manifest ├── ftdetect └── markdown.vim ├── doc └── releases │ ├── v1.0.2.mkd │ ├── v1.0.0.mkd │ ├── v1.0.1.mkd │ ├── v1.0.3.mkd │ ├── v1.2.1.mkd │ ├── v1.1.0.mkd │ ├── v1.2.2.mkd │ └── v1.2.0.mkd ├── plugin-info.txt ├── snippets └── markdown.snippets ├── Bakefile ├── README.mkd └── syntax └── markdown.vim /.gitignore: -------------------------------------------------------------------------------- 1 | .*.sw[p-z] 2 | *.gz 3 | *.tmp 4 | *.vba 5 | *.zip 6 | 7 | -------------------------------------------------------------------------------- /Manifest: -------------------------------------------------------------------------------- 1 | ftdetect/markdown.vim 2 | snippets/markdown.snippets 3 | syntax/markdown.vim 4 | -------------------------------------------------------------------------------- /ftdetect/markdown.vim: -------------------------------------------------------------------------------- 1 | " Markdown 2 | autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} set filetype=markdown 3 | -------------------------------------------------------------------------------- /doc/releases/v1.0.2.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.0.2 2 | =================== 3 | 4 | Small updates. 5 | 6 | * Updates in documentation. 7 | * Renamed build file. 8 | 9 | -------------------------------------------------------------------------------- /doc/releases/v1.0.0.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.0.0 2 | =================== 3 | 4 | This release include new features. 5 | 6 | * Syntax file renamed to `markdown.vim`. 7 | * Added snippets. 8 | * Added Vimball package support. 9 | * Versioning. 10 | 11 | -------------------------------------------------------------------------------- /doc/releases/v1.0.1.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.0.1 2 | =================== 3 | 4 | Improvements and fixes in plugin. 5 | 6 | * Fix in task pool file. 7 | * Change file name of the package content. 8 | * New tasks in pool. 9 | * Small improvements in syntax and doc updates. 10 | 11 | -------------------------------------------------------------------------------- /doc/releases/v1.0.3.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.0.3 2 | =================== 3 | 4 | * Added auto-detection for file type. 5 | * Updates in documentation. 6 | * Updates in package list. 7 | 8 | For more information about this version, please visit the repository hosted 9 | on . 10 | -------------------------------------------------------------------------------- /doc/releases/v1.2.1.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.2.1 2 | =================== 3 | 4 | * Fixes. 5 | * The backtick trigger has been fixed. 6 | 7 | * Improvements. 8 | * Adding of task for creating a package for tests. 9 | 10 | For more information about this version, please visit the repository hosted 11 | on . 12 | 13 | -------------------------------------------------------------------------------- /plugin-info.txt: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Markdown", 3 | "version" : "1.1.1", 4 | "author" : "Hallison Batista ", 5 | "repository" : {"type": "git", "url": "git://github.com/hallison/vim-markdown.git"}, 6 | "dependencies" : { 7 | "snipMate": {} 8 | }, 9 | "description" : "Markdown syntax highlight for Vim editor with snippets support" 10 | } 11 | -------------------------------------------------------------------------------- /doc/releases/v1.1.0.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.1.0 2 | =================== 3 | 4 | * Enhancements. 5 | * Added build using Bakefile (Bash-Toolbox). 6 | * Manifest file for VBA package. 7 | 8 | * Fixes. 9 | * Fixes in the file detection. 10 | * Fixes in link snippets. 11 | 12 | For more information about this version, please visit the repository hosted 13 | on . 14 | 15 | -------------------------------------------------------------------------------- /doc/releases/v1.2.2.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.2.2 2 | =================== 3 | 4 | Several fixes. Thanks to [Dustin Ingram][]. 5 | 6 | * Fixes. 7 | * Multi-paragraph list items. 8 | * Code block in list. 9 | 10 | For more information about this version, please visit the repository hosted 11 | on . 12 | 13 | [Dustin Ingram]: http://github.com/dustingram 14 | "Dustin Ingram" 15 | 16 | -------------------------------------------------------------------------------- /doc/releases/v1.2.0.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown v1.2.0 2 | =================== 3 | 4 | * Fixes. 5 | * The italics has been fixed. Thanks to Ian Smith-Heisters. 6 | * Fix in gzip package extension. 7 | 8 | * Improvements. 9 | * Support multi-line captioned images and links. This feature is supported 10 | by Pandoc and others parsers. Thanks to Bryan Silverthorn. 11 | * You can install Markdown using vim-addon-manager. More details see 12 | . 13 | 14 | For more information about this version, please visit the repository hosted 15 | on . 16 | 17 | -------------------------------------------------------------------------------- /snippets/markdown.snippets: -------------------------------------------------------------------------------- 1 | # [link][] 2 | snippet [] 3 | [${1:link_id}][]${2} 4 | # [link][id] 5 | snippet [[ 6 | [${1:link}][${2:id}]${3} 7 | # [link](url) 8 | snippet [( 9 | [${1:link}](http://${2:url})${3} 10 | # [link](email) 11 | snippet [@ 12 | [${1:link}](mailto:${2:email})${3} 13 | # [link](url "title") 14 | snippet [(" 15 | [${1:link}](${2:url} "${3:title}")${4} 16 | # [id]: url "title" 17 | snippet [: 18 | [${1:id}]: http://${2:url} "${3:title}" 19 | # [id]: email "title" 20 | snippet [:@ 21 | [${1:id}]: mailto:${2:url} "${3:title}" 22 | # ![alt][id] 23 | snippet ![ 24 | ![${1:alt}][${2:id}]${3} 25 | # ![alt](url) 26 | snippet !( 27 | ![${1:alt}](${2:url})${3} 28 | # ![alt](url "title") 29 | snippet !(" 30 | ![${1:alt}](${2:url} "${3:title}")${4} 31 | # *emphasis* or _emphasis_ 32 | snippet * 33 | *${1}*${2} 34 | snippet _ 35 | _${1}_${2} 36 | # **strong** or __strong__ 37 | snippet ** 38 | **${1}**${2} 39 | snippet __ 40 | __${1}__${2} 41 | # `code` 42 | snippet ` 43 | \`${1}\`${2} 44 | -------------------------------------------------------------------------------- /Bakefile: -------------------------------------------------------------------------------- 1 | declare pkg_name=markdown 2 | declare pkg_base=$(dirname "$0") 3 | declare pkg_version=$(git tag | sort | tail -n 1) 4 | declare pkg_file="${pkg_name}-${pkg_version#v}.vba" 5 | 6 | GLOB=(ftdetect/* snippets/* syntax/*) 7 | 8 | source manifest.bk 9 | source version.bk 10 | 11 | desc package "Create ${pkg_file}.gz" 12 | task package { 13 | test -f ${pkg_file} && rm ${pkg_file} 14 | test -f ${pkg_file}.* && rm ${pkg_file}.* 15 | 16 | status "Creating package" 17 | vim Manifest +":%MkVimball! ${pkg_file} ." +":q" 18 | gzip ${pkg_file} 19 | } 20 | 21 | desc pkgtest "Create a VBA test package" 22 | task pkgtest { 23 | pkg_file="${pkg_name}-test.vba" 24 | invoke package 25 | } 26 | 27 | desc install "Install vimball in ${HOME}/.vim/" 28 | task install { 29 | invoke package 30 | status "Intalling ${pkg_file}" 31 | vim ${pkg_file}.gz +":source %" +":q" &> /dev/null 32 | } 33 | 34 | desc doc "Build documentation" 35 | task doc { 36 | status "Building documentation" 37 | run markdown -f toc -T -o README.html README.mkd 38 | } 39 | 40 | task push { 41 | news="github codaset" 42 | hosts="origin github codaset" 43 | } 44 | 45 | desc push:news "Push all changes to hosts" 46 | task push:news { 47 | status "Pushing new changes to ${news// /, }" 48 | for remote in ${news}; do 49 | run git push $remote news 50 | done 51 | } 52 | 53 | desc push:release "Push a new release to hosts" 54 | task push:release { 55 | status "Pushing new release to ${hosts// /, }" 56 | for remote in ${hosts}; do 57 | git push --tags $remote master 58 | done 59 | } 60 | 61 | # vim: filetype=sh 62 | 63 | -------------------------------------------------------------------------------- /README.mkd: -------------------------------------------------------------------------------- 1 | Vim-Markdown 2 | ============ 3 | 4 | Description 5 | ----------- 6 | 7 | [Markdown][] syntax support for [Vim][] Editor. 8 | 9 | [Vim-Markdown][script homepage] have a support for snippets. Therefore, it's 10 | recommended that you use [SnipMate][] plugin. 11 | 12 | Install 13 | ------- 14 | 15 | Download the [gzipball][script homepage] from Vim [script homepage][] and 16 | open the package using [Vim][] and use the command `:source %`. Or run the 17 | following command: 18 | 19 | vim markdown-.vba.gz +":source %" 20 | 21 | Done! All files will be extracted in your [Vim][] home directory. 22 | If you checkout from repository, install using the following commands: 23 | 24 | bash do install 25 | 26 | Or 27 | 28 | ./do install 29 | 30 | This instruction will be create a Vimball file and install. 31 | 32 | Information 33 | ----------- 34 | 35 | The original [Markdown][] [Vim][] syntax was created by [Ben Williams][]. 36 | 37 | You maybe contributes to source. So, send a feedback in [issue tracker][]. 38 | 39 | Vim-Markdown is hosted on following servers: 40 | 41 | * [Github (original source)](http://github.com/plasticboy/vim-markdown/) 42 | * [Github (fork project)](http://github.com/hallison/vim-markdown) 43 | * [Codaset](http://codaset.com/hallison/vim-markdown) 44 | 45 | Visit the [script homepage][] for more information. 46 | 47 | Copyright 48 | --------- 49 | 50 | Copyright (c) 2010 Hallison Batista 51 | 52 | Copyright (c) 2009 Ben Williams 53 | 54 | [markdown]: http://daringfireball.net/projects/markdown/ 55 | "Markdown syntax project" 56 | [script homepage]: http://www.vim.org/scripts/script.php?script_id=2882 57 | "Markdown Vim Script homepage" 58 | [vim]: http://www.vim.org 59 | "Vim Editor" 60 | [issue tracker]: http://github.com/hallison/vim-markdown/issues 61 | "Vim-Markdown Github Issues" 62 | [ben williams]: http://plasticboy.com/markdown-vim-mode/ 63 | "Markdown Vim Mode" 64 | [snipmate]: http://www.vim.org/scripts/script.php?script_id=2540 65 | "SnipMate plugin" 66 | 67 | -------------------------------------------------------------------------------- /syntax/markdown.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Markdown 3 | " Author: Ben Williams 4 | " Maintainer: Hallison Batista 5 | " URL: http://plasticboy.com/markdown-vim-mode/ 6 | " Version: 1.0.1 7 | " Last Change: Fri Dec 4 08:36:48 AMT 2009 8 | " Remark: Uses HTML syntax file 9 | " Remark: I don't do anything with angle brackets (<>) because that would too easily 10 | " easily conflict with HTML syntax 11 | " TODO: Handle stuff contained within stuff (e.g. headings within blockquotes) 12 | 13 | " Read the HTML syntax to start with 14 | if version < 600 15 | so :p:h/html.vim 16 | else 17 | runtime! syntax/html.vim 18 | unlet b:current_syntax 19 | endif 20 | 21 | if version < 600 22 | syntax clear 23 | elseif exists("b:current_syntax") 24 | finish 25 | endif 26 | 27 | " Don't use standard HiLink, it will not work with included syntax files 28 | if version < 508 29 | command! -nargs=+ HtmlHiLink hi link 30 | else 31 | command! -nargs=+ HtmlHiLink hi def link 32 | endif 33 | 34 | syntax spell toplevel 35 | syntax case ignore 36 | syntax sync linebreaks=1 37 | 38 | " Additions to HTML groups 39 | syntax region htmlBold start=/\\\@) 52 | syntax region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite 53 | syntax region mkdLinkDefTarget start="<\?\zs\S" excludenl end="\ze[>[:space:]\n]" contained nextgroup=mkdLinkTitle,mkdLinkDef skipwhite skipnl oneline 54 | syntax region mkdLinkTitle matchgroup=mkdDelimiter start=+"+ end=+"+ contained 55 | syntax region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained 56 | syntax region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained 57 | 58 | " Define Markdown groups 59 | syntax match mkdLineContinue ".$" contained 60 | syntax match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/ 61 | syntax match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-$/ 62 | syntax match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_$/ 63 | syntax match mkdRule /^\s*-\{3,}$/ 64 | syntax match mkdRule /^\s*\*\{3,5}$/ 65 | syntax match mkdListItem /^\s*[-*+]\s\+.*\n\(\(^.\+\n\)*\n\?\)\(\(^\(\s\{4}\|\t\)\+.*\n\)\(^.\+\n\)*\n\?\)*/ contains=mkdListCode,mkdCode,htmlBold,htmlItalic,htmlSpecialChar,@Spell 66 | syntax match mkdListItem /^\s*\d\+\.\s\+.*\n\(\(^.\+\n\)*\n\?\)\(\(^\(\s\{4}\|\t\)\+.*\n\)\(^.\+\n\)*\n\?\)*/ contains=mkdListCode,mkdCode,htmlBold,htmlItalic,htmlSpecialChar,@Spell 67 | " 68 | syntax match mkdBlockCode /^\s*\n\(^\(\s\{4}\|\t\).*\n\)\+/ 69 | syntax match mkdListCode /^\s*\n\(^\(\s\{8}\|\t{2}\).*\n\)\+/ 70 | syntax match mkdLineBreak / \+$/ 71 | syntax region mkdCode start=/\\\@/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell 74 | syntax region mkdCode start="]*>" end="" 75 | syntax region mkdCode start="]*>" end="" 76 | 77 | " HTML headings 78 | syntax region htmlH1 start="^\s*#" end="\($\|#\+\)" contains=@Spell 79 | syntax region htmlH2 start="^\s*##" end="\($\|#\+\)" contains=@Spell 80 | syntax region htmlH3 start="^\s*###" end="\($\|#\+\)" contains=@Spell 81 | syntax region htmlH4 start="^\s*####" end="\($\|#\+\)" contains=@Spell 82 | syntax region htmlH5 start="^\s*#####" end="\($\|#\+\)" contains=@Spell 83 | syntax region htmlH6 start="^\s*######" end="\($\|#\+\)" contains=@Spell 84 | syntax match htmlH1 /^.\+\n=\+$/ contains=@Spell 85 | syntax match htmlH2 /^.\+\n-\+$/ contains=@Spell 86 | 87 | "highlighting for Markdown groups 88 | HtmlHiLink mkdString String 89 | HtmlHiLink mkdCode String 90 | HtmlHiLink mkdListCode String 91 | HtmlHiLink mkdBlockCode String 92 | HtmlHiLink mkdBlockquote Comment 93 | HtmlHiLink mkdLineContinue Comment 94 | HtmlHiLink mkdListItem Identifier 95 | HtmlHiLink mkdRule Identifier 96 | HtmlHiLink mkdLineBreak Todo 97 | HtmlHiLink mkdLink htmlLink 98 | HtmlHiLink mkdURL htmlString 99 | HtmlHiLink mkdID Identifier 100 | HtmlHiLink mkdLinkDef mkdID 101 | HtmlHiLink mkdLinkDefTarget mkdURL 102 | HtmlHiLink mkdLinkTitle htmlString 103 | 104 | HtmlHiLink mkdDelimiter Delimiter 105 | 106 | let b:current_syntax = "markdown" 107 | 108 | delcommand HtmlHiLink 109 | " vim: tabstop=2 110 | --------------------------------------------------------------------------------