Mercurial > vim
annotate runtime/ftplugin/hamster.vim @ 23515:8cce160b9183 v8.2.2300
patch 8.2.2300: Vim9: wrong order on type stack when using dict
Commit: https://github.com/vim/vim/commit/d62d87d8f3f337a25b7da72abf55fc8a4bb6100c
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 4 17:40:12 2021 +0100
patch 8.2.2300: Vim9: wrong order on type stack when using dict
Problem: Vim9: wrong order on type stack when using dict.
Solution: Generate constants before a dict. (closes https://github.com/vim/vim/issues/7619)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Jan 2021 17:45:03 +0100 |
parents | 146a1e213b60 |
children | 34b4eb3a8458 |
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> |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
11160
diff
changeset
|
5 " Last Change: 2017 Mar 18 |
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 |
18 let b:undo_ftplugin = "setl fo< com< tw< commentstring<" | |
19 \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" | |
20 | |
21 " Set 'formatoptions' to break comment lines but not other lines, | |
22 " and insert the comment leader when hitting <CR> or using "o". | |
23 setlocal fo-=t fo+=croql | |
24 | |
25 " Use the # sign for comments | |
26 setlocal comments=:# | |
27 | |
28 " Format comments to be up to 78 characters long | |
29 if &tw == 0 | |
30 setlocal tw=78 | |
31 endif | |
32 | |
33 " Comments start with a double quote | |
34 setlocal commentstring=#%s | |
35 | |
36 " Move around functions. | |
37 noremap <silent><buffer> [[ :call search('^\s*sub\>', "bW")<CR> | |
38 noremap <silent><buffer> ]] :call search('^\s*sub\>', "W")<CR> | |
39 noremap <silent><buffer> [] :call search('^\s*endsub\>', "bW")<CR> | |
40 noremap <silent><buffer> ][ :call search('^\s*endsub\>', "W")<CR> | |
41 | |
42 " Move around comments | |
43 noremap <silent><buffer> ]# :call search('^\s*#\@!', "W")<CR> | |
44 noremap <silent><buffer> [# :call search('^\s*#\@!', "bW")<CR> | |
45 | |
46 " Let the matchit plugin know what items can be matched. | |
47 if exists("loaded_matchit") | |
48 let b:match_ignorecase = 0 | |
49 let b:match_words = | |
50 \ '\<sub\>:\<return\>:\<endsub\>,' . | |
51 \ '\<do\|while\|repeat\|for\>:\<break\>:\<continue\>:\<loop\|endwhile\|until\|endfor\>,' . | |
52 \ '\<if\>:\<else\%[if]\>:\<endif\>' | |
53 | |
54 " Ignore ":syntax region" commands, the 'end' argument clobbers if-endif | |
55 " let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" || | |
56 " \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"' | |
57 endif | |
58 | |
59 setlocal ignorecase | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
60 let &cpo = s:cpo_save |
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
61 unlet s:cpo_save |
1121 | 62 setlocal cpo+=M " makes \%( match \) |