├── .gitignore ├── Bakefile ├── Manifest ├── README.rdoc ├── ftdetect └── rdoc.vim ├── snippets └── rdoc.snippets └── syntax └── rdoc.vim /.gitignore: -------------------------------------------------------------------------------- 1 | .*.sw[p-z] 2 | *.gz 3 | *.tag 4 | *.tmp 5 | *.vba 6 | *.zip 7 | 8 | -------------------------------------------------------------------------------- /Bakefile: -------------------------------------------------------------------------------- 1 | declare pkg_name=rdoc 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 | MANIFEST="Manifest" 8 | 9 | source manifest.bk 10 | source version.bk 11 | 12 | desc package "Create ${pkg_file}.gz" 13 | task package { 14 | test -f ${pkg_file} && rm ${pkg_file} 15 | test -f ${pkg_file}.* && rm ${pkg_file}.* 16 | 17 | status "Creating package ${pkg_file}.gz" 18 | vim ${MANIFEST} +":%MkVimball! ${pkg_file} . " +":q" 19 | run gzip ${pkg_file} 20 | } 21 | 22 | desc install "Install vimball in ${HOME}/.vim/" 23 | task install { 24 | package 25 | status "Intalling ${pkg_file}" 26 | vim ${pkg_file}.gz +":source %" +":q" &> /dev/null 27 | } 28 | 29 | desc doc "Build documentation" 30 | task doc { 31 | status "Building documentation" 32 | run rdoc --main README.rdoc --title "RDoc.vim" README.rdoc &> /dev/null 33 | } 34 | 35 | task push { 36 | news="github codaset" 37 | hosts="origin github codaset" 38 | } 39 | 40 | desc push:news "Push all changes to hosts" 41 | task push:news { 42 | status "Pushing new changes to ${news// /, }" 43 | for remote in ${news}; do 44 | run git push $remote news 45 | done 46 | } 47 | 48 | desc push:release "Push a new release to hosts" 49 | task push:release { 50 | status "Pushing new release to ${hosts// /, }" 51 | for remote in ${hosts}; do 52 | git push --tags $remote master 53 | done 54 | } 55 | 56 | # vim: filetype=sh 57 | 58 | -------------------------------------------------------------------------------- /Manifest: -------------------------------------------------------------------------------- 1 | ftdetect/rdoc.vim 2 | snippets/rdoc.snippets 3 | syntax/rdoc.vim 4 | -------------------------------------------------------------------------------- /README.rdoc: -------------------------------------------------------------------------------- 1 | = Vim - RDoc 2 | 3 | == Description 4 | 5 | {RDoc}[http://rdoc.rubyforge.org/] syntax support for 6 | {Vim Editor}[http://www.vim.org/]. 7 | 8 | RDoc have a support for snippets. Therefore, it's recommended that you use 9 | {SnipMate}[http://www.vim.org/scripts/script.php?script_id=2540] plugin. 10 | 11 | == Install 12 | 13 | Download the +gzipball+ from 14 | {script homepage}[http://www.vim.org/scripts/script.php?script_id=2878] 15 | and open the package using Vim and use the command `:source %` or run the 16 | following command: 17 | 18 | vim rdoc-.vba.gz +":source %" 19 | 20 | Done! All files will be extracted in your Vim home directory. 21 | If you checkout from repository, install using the following commands: 22 | 23 | bake install 24 | 25 | The `bake` command is distributed with 26 | {Bash-Toolbox}[http://github.com/codigorama/bash-toolbox/]. This instruction 27 | will be create a Vimball file and install. 28 | 29 | == Information 30 | 31 | You maybe contributes to source. So, send a feedback in 32 | {issue tracker}[http://github.com/hallison/vim-rdoc/issues]. 33 | 34 | Vim-RDoc is hosted on following servers: 35 | 36 | * {Github}[http://github.com/hallison/vim-rdoc] 37 | * {Codaset}[http://codaset.com/hallison/vim-rdoc] 38 | 39 | Visit the 40 | {script homepage}[http://www.vim.org/scripts/script.php?script_id=2878] 41 | for more information. 42 | 43 | == Copyright 44 | 45 | Copyright (c) 2009,2010,2011 Hallison Batista 46 | 47 | Permission is hereby granted, free of charge, to any person obtaining a copy 48 | of this software and associated documentation files (the "Software"), to deal 49 | in the Software without restriction, including without limitation the rights 50 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 51 | copies of the Software, and to permit persons to whom the Software is 52 | furnished to do so, subject to the following conditions: 53 | 54 | The above copyright notice and this permission notice shall be included in 55 | all copies or substantial portions of the Software. 56 | 57 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 58 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 59 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 60 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 61 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 62 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 63 | THE SOFTWARE. 64 | 65 | -------------------------------------------------------------------------------- /ftdetect/rdoc.vim: -------------------------------------------------------------------------------- 1 | " RDoc 2 | autocmd BufNewFile,BufRead *.{rd,rdoc} set filetype=rdoc 3 | 4 | -------------------------------------------------------------------------------- /snippets/rdoc.snippets: -------------------------------------------------------------------------------- 1 | # {link}[url]text 2 | snippet {} 3 | {${1:link}}[http://${2:url}]${3} 4 | # {name}[email]text 5 | snippet {@ 6 | {${1:name}}[mailto:${2:email}]${3} 7 | # {link}[local]text 8 | snippet {l 9 | {${1:link}}[link:${2:local}]${3} 10 | # *bold* 11 | snippet * 12 | *${1}*${2} 13 | # _emphasis_ 14 | snippet _ 15 | _${1}_${2} 16 | # +code+ 17 | snippet + 18 | +${1}+${2} 19 | # === title 20 | snippet 3= 21 | === ${1:title} 22 | 23 | ${2} 24 | # ==== title 25 | snippet 4= 26 | ==== ${1:title} 27 | 28 | ${2} 29 | # ===== title 30 | snippet 5= 31 | ===== ${1:title} 32 | 33 | ${2} 34 | # ====== title 35 | snippet 6= 36 | ====== ${1:title} 37 | 38 | ${2} 39 | # [item] description 40 | snippet [] 41 | [${1:item}] ${2:description} 42 | # [*item*] description 43 | snippet [* 44 | [*${1:item}*] ${2:description} 45 | # item :: description 46 | snippet :: 47 | ${1:item} :: ${2:description} 48 | # *item* :: description 49 | snippet :* 50 | *${1:item}* :: ${2:description} 51 | -------------------------------------------------------------------------------- /syntax/rdoc.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: RDoc - Ruby Documentation 3 | " Author: Hallison Batista 4 | " URL: http://hallisonbatista.com/projetos/rdoc.vim 5 | " Version: 1.1.0 6 | " Last Change: Fri Dec 4 09:47:32 AMT 2009 7 | " Remark: Inspired in Markdown syntax written by Ben Williams . 8 | " http://www.vim.org/scripts/script.php?script_id=1242 9 | 10 | " Read the HTML syntax to start with 11 | if version < 600 12 | source :p:h/html.vim 13 | else 14 | runtime! syntax/html.vim 15 | unlet b:current_syntax 16 | endif 17 | 18 | if version < 600 19 | syntax clear 20 | elseif exists("b:current_syntax") 21 | finish 22 | endif 23 | 24 | " Don't use standard HiLink, it will not work with included syntax files 25 | if version < 508 26 | command! -nargs=+ HtmlHiLink highlight link 27 | else 28 | command! -nargs=+ HtmlHiLink highlight def link 29 | endif 30 | 31 | syntax spell toplevel 32 | syntax case ignore 33 | syntax sync linebreaks=1 34 | 35 | " RDoc text markup 36 | syntax region rdocBold start=/\\\@]*>" end="" 63 | syntax region rdocCode start="]*>" end="" 64 | syntax region rdocCode start="]*>" end="" 65 | 66 | " RDoc HTML headings 67 | syntax region htmlH1 start="^\s*=" end="\($\)" contains=@Spell 68 | syntax region htmlH2 start="^\s*==" end="\($\)" contains=@Spell 69 | syntax region htmlH3 start="^\s*===" end="\($\)" contains=@Spell 70 | syntax region htmlH4 start="^\s*====" end="\($\)" contains=@Spell 71 | syntax region htmlH5 start="^\s*=====" end="\($\)" contains=@Spell 72 | syntax region htmlH6 start="^\s*======" end="\($\)" contains=@Spell 73 | 74 | " Highlighting for RDoc groups 75 | HtmlHiLink rdocCode String 76 | HtmlHiLink rdocBlockquote Comment 77 | HtmlHiLink rdocLineContinue Comment 78 | HtmlHiLink rdocListItem Identifier 79 | HtmlHiLink rdocRule Identifier 80 | HtmlHiLink rdocLineBreak Todo 81 | HtmlHiLink rdocLink htmlLink 82 | HtmlHiLink rdocInlineURL htmlLink 83 | HtmlHiLink rdocURL htmlString 84 | HtmlHiLink rdocID Identifier 85 | HtmlHiLink rdocBold htmlBold 86 | HtmlHiLink rdocEmphasis htmlItalic 87 | HtmlHiLink rdocMonospace String 88 | 89 | HtmlHiLink rdocDelimiter Delimiter 90 | 91 | let b:current_syntax = "rdoc" 92 | 93 | delcommand HtmlHiLink 94 | 95 | " vim: tabstop=2 96 | --------------------------------------------------------------------------------