annotate runtime/ftplugin/hamster.vim @ 33410:b14a47736a1c v9.0.1963

patch 9.0.1963: Configure script may not detect xattr Commit: https://github.com/vim/vim/commit/6de4e58cf27a3bb6e81653ca63b77e29d1bb46f2 Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Sep 30 14:19:14 2023 +0200 patch 9.0.1963: Configure script may not detect xattr Problem: Configure script may not detect xattr correctly Solution: include sys/xattr instead of attr/xattr, make Test_write_with_xattr_support() test xattr feature correctly This also applies to the Smack security feature, so change the include and configure script for it as well. closes: #13229 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Sep 2023 14:30:03 +0200
parents 34b4eb3a8458
children 7c7432a53a6c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
1 " Vim filetype plugin
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
2 " Language: Hamster Script
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
3 " Version: 2.0.6.0
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 3410
diff changeset
4 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11229
diff changeset
5 " Last Change: 2021 Jan 19
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
6
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
7 " Only do this when not done yet for this buffer
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
8 if exists("b:did_ftplugin")
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
9 finish
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
10 endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
11
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
12 " Don't load another plugin for this buffer
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
13 let b:did_ftplugin = 1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
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
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 3410
diff changeset
16 set cpo&vim
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
17
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
18 let b:undo_ftplugin = "setl fo< com< tw< commentstring<"
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
19 \ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
20
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
21 " Set 'formatoptions' to break comment lines but not other lines,
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
22 " and insert the comment leader when hitting <CR> or using "o".
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
23 setlocal fo-=t fo+=croql
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
24
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
25 " Use the # sign for comments
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
26 setlocal comments=:#
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
27
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
28 " Format comments to be up to 78 characters long
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
29 if &tw == 0
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
30 setlocal tw=78
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
31 endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
32
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
33 " Comments start with a double quote
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
34 setlocal commentstring=#%s
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
35
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
36 " Move around functions.
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
37 noremap <silent><buffer> [[ :call search('^\s*sub\>', "bW")<CR>
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
38 noremap <silent><buffer> ]] :call search('^\s*sub\>', "W")<CR>
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
39 noremap <silent><buffer> [] :call search('^\s*endsub\>', "bW")<CR>
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
40 noremap <silent><buffer> ][ :call search('^\s*endsub\>', "W")<CR>
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
41
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
42 " Move around comments
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
43 noremap <silent><buffer> ]# :call search('^\s*#\@!', "W")<CR>
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
44 noremap <silent><buffer> [# :call search('^\s*#\@!', "bW")<CR>
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
45
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
46 " Let the matchit plugin know what items can be matched.
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
47 if exists("loaded_matchit")
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
48 let b:match_ignorecase = 0
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
49 let b:match_words =
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
50 \ '\<sub\>:\<return\>:\<endsub\>,' .
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
51 \ '\<do\|while\|repeat\|for\>:\<break\>:\<continue\>:\<loop\|endwhile\|until\|endfor\>,' .
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
52 \ '\<if\>:\<else\%[if]\>:\<endif\>'
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
53
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
54 " Ignore ":syntax region" commands, the 'end' argument clobbers if-endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
55 " let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" ||
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
56 " \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"'
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
57 endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
58
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
59 setlocal ignorecase
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11229
diff changeset
60
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
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11229
diff changeset
63
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11229
diff changeset
64 " Disabled, 'cpo' is a global option.
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11229
diff changeset
65 " setlocal cpo+=M " makes \%( match \)