Mercurial > vim
annotate runtime/ftplugin/hamster.vim @ 11160:d0a20101ecb2
Update runtime files.
commit https://github.com/vim/vim/commit/036986f1507d223549d110af300144468bd3a1f7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 16 17:41:02 2017 +0100
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 16 Mar 2017 17:45:05 +0100 |
parents | 94601b379f38 |
children | 146a1e213b60 |
rev | line source |
---|---|
1121 | 1 " Vim filetype plugin |
2 " Language: Hamster Script | |
3 " Version: 2.0.6.0 | |
11160 | 4 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> |
5 " Last Change: 2017 Mar 07 | |
1121 | 6 |
7 " Only do this when not done yet for this buffer | |
8 if exists("b:did_ftplugin") | |
9 finish | |
10 endif | |
11 | |
12 " Don't load another plugin for this buffer | |
13 let b:did_ftplugin = 1 | |
14 | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
15 let s:cpo_save = &cpo |
11160 | 16 set cpo&vim |
1121 | 17 set cpo-=C |
18 | |
19 let b:undo_ftplugin = "setl fo< com< tw< commentstring<" | |
20 \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" | |
21 | |
22 " Set 'formatoptions' to break comment lines but not other lines, | |
23 " and insert the comment leader when hitting <CR> or using "o". | |
24 setlocal fo-=t fo+=croql | |
25 | |
26 " Use the # sign for comments | |
27 setlocal comments=:# | |
28 | |
29 " Format comments to be up to 78 characters long | |
30 if &tw == 0 | |
31 setlocal tw=78 | |
32 endif | |
33 | |
34 " Comments start with a double quote | |
35 setlocal commentstring=#%s | |
36 | |
37 " Move around functions. | |
38 noremap <silent><buffer> [[ :call search('^\s*sub\>', "bW")<CR> | |
39 noremap <silent><buffer> ]] :call search('^\s*sub\>', "W")<CR> | |
40 noremap <silent><buffer> [] :call search('^\s*endsub\>', "bW")<CR> | |
41 noremap <silent><buffer> ][ :call search('^\s*endsub\>', "W")<CR> | |
42 | |
43 " Move around comments | |
44 noremap <silent><buffer> ]# :call search('^\s*#\@!', "W")<CR> | |
45 noremap <silent><buffer> [# :call search('^\s*#\@!', "bW")<CR> | |
46 | |
47 " Let the matchit plugin know what items can be matched. | |
48 if exists("loaded_matchit") | |
49 let b:match_ignorecase = 0 | |
50 let b:match_words = | |
51 \ '\<sub\>:\<return\>:\<endsub\>,' . | |
52 \ '\<do\|while\|repeat\|for\>:\<break\>:\<continue\>:\<loop\|endwhile\|until\|endfor\>,' . | |
53 \ '\<if\>:\<else\%[if]\>:\<endif\>' | |
54 | |
55 " Ignore ":syntax region" commands, the 'end' argument clobbers if-endif | |
56 " let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" || | |
57 " \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"' | |
58 endif | |
59 | |
60 setlocal ignorecase | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
61 let &cpo = s:cpo_save |
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
62 unlet s:cpo_save |
1121 | 63 setlocal cpo+=M " makes \%( match \) |