Bram Moolenaar | dbc2802 | 2014-07-26 13:40:44 +0200 | [diff] [blame] | 1 | " Vim filetype plugin file |
| 2 | " Language: Vroom (vim testing and executable documentation) |
Bram Moolenaar | fb53927 | 2014-08-22 19:21:47 +0200 | [diff] [blame] | 3 | " Maintainer: David Barnett (https://github.com/google/vim-ft-vroom) |
Bram Moolenaar | dbc2802 | 2014-07-26 13:40:44 +0200 | [diff] [blame] | 4 | " Last Change: 2014 Jul 23 |
| 5 | |
| 6 | if exists('b:did_ftplugin') |
| 7 | finish |
| 8 | endif |
| 9 | let b:did_ftplugin = 1 |
| 10 | |
| 11 | let s:cpo_save = &cpo |
| 12 | set cpo-=C |
| 13 | |
| 14 | |
| 15 | let b:undo_ftplugin = 'setlocal formatoptions< shiftwidth< softtabstop<' . |
| 16 | \ ' expandtab< iskeyword< comments< commentstring<' |
| 17 | |
| 18 | setlocal formatoptions-=t |
| 19 | |
| 20 | " The vroom interpreter doesn't accept anything but 2-space indent. |
| 21 | setlocal shiftwidth=2 |
| 22 | setlocal softtabstop=2 |
| 23 | setlocal expandtab |
| 24 | |
| 25 | " To allow tag lookup and autocomplete for whole autoload functions, '#' must be |
| 26 | " a keyword character. This also conforms to the behavior of ftplugin/vim.vim. |
| 27 | setlocal iskeyword+=# |
| 28 | |
| 29 | " Vroom files have no comments (text is inert documentation unless indented). |
| 30 | setlocal comments= |
| 31 | setlocal commentstring= |
| 32 | |
| 33 | |
| 34 | let &cpo = s:cpo_save |
| 35 | unlet s:cpo_save |