├── README.md ├── ftdetect └── present.vim ├── ftplugin └── present.vim ├── syntax └── present.vim └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | Super simple VIM syntax for golang's [present](https://godoc.org/golang.org/x/tools/present). 2 | -------------------------------------------------------------------------------- /ftdetect/present.vim: -------------------------------------------------------------------------------- 1 | " present filetype file 2 | au BufRead,BufNewFile *.{slide,article} set filetype=present 3 | -------------------------------------------------------------------------------- /ftplugin/present.vim: -------------------------------------------------------------------------------- 1 | " File: ftplugin/present.vim 2 | " Description: vim-present-simple plugin, adjusts line lenght, tabs etc. 3 | " Created: 05/20/2016 4 | " License: The MIT License (MIT) 5 | 6 | setlocal tabstop=4 7 | setlocal softtabstop=4 8 | setlocal shiftwidth=4 9 | setlocal tw=78 10 | setlocal completefunc=syntaxcomplete#Complete 11 | -------------------------------------------------------------------------------- /syntax/present.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: present (http://godoc.org/code.google.com/p/go.tools/present) 3 | " Filenames: *.slide 4 | 5 | if exists("b:current_syntax") 6 | finish 7 | endif 8 | 9 | unlet! b:current_syntax 10 | 11 | " Syntax 12 | syn keyword Todo TODO 13 | syn region slideSection start="^*\+ "hs=e+1 end="$"he=s-1 14 | syn match slideBullet "^-\+ " 15 | syn region slidePrefomat start="^\s\+" end="$" 16 | syn match slideCode "^\.\(code\|play\|image\|iframe\|link\|html\|caption\)" contains=slideOption,slideLink 17 | syn match slideOption "\s\+-\S\+" 18 | syn match slideLink "https\?://[0-9a-zA-Z_/:%#\$&\?\(\)~\.=\+\-]\+" 19 | syn region slideComment start="^#" end="$" contains=Todo 20 | 21 | " Highlight 22 | hi link slideSection Identifier 23 | hi link slideBullet Keyword 24 | hi link slidePrefomat PreProc 25 | hi link slideCode Function 26 | hi link slideOption Type 27 | hi link slideLink Underlined 28 | hi link slideComment Comment 29 | 30 | let b:current_syntax = "slide" 31 | 32 | " vim:set sw=2: 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Raphael Simon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------