Mercurial > vim
annotate runtime/ftplugin/vhdl.vim @ 33725:5af7b93fc4f5 v9.0.2092
patch 9.0.2092: tests: failure in test_arabic
Commit: https://github.com/vim/vim/commit/2a94e9879283c55b162cf4e6d9ac7e0b0c35bc97
Author: Christian Brabandt <cb@256bit.org>
Date: Sun Nov 5 19:17:10 2023 +0100
patch 9.0.2092: tests: failure in test_arabic
Problem: tests: failure in test_arabic
Solution: adjust the test for the changed arabic keymap
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 05 Nov 2023 19:30:03 +0100 |
parents | 02939ae3aaca |
children | 8ae680be2a51 |
rev | line source |
---|---|
671 | 1 " VHDL filetype plugin |
2 " Language: VHDL | |
3224 | 3 " Maintainer: R.Shankar <shankar.pec?gmail.com> |
671 | 4 " Modified By: Gerald Lai <laigera+vim?gmail.com> |
3224 | 5 " Last Change: 2011 Dec 11 |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
6 " 2023 Aug 28 by Vim Project (undo_ftplugin, commentstring) |
153 | 7 |
8 " Only do this when not done yet for this buffer | |
9 if exists("b:did_ftplugin") | |
10 finish | |
11 endif | |
12 | |
13 " Don't load another plugin for this buffer | |
14 let b:did_ftplugin = 1 | |
15 | |
3224 | 16 let s:cpo_save = &cpo |
17 set cpo&vim | |
18 | |
153 | 19 " Set 'formatoptions' to break comment lines but not other lines, |
20 " and insert the comment leader when hitting <CR> or using "o". | |
21 "setlocal fo-=t fo+=croqlm1 | |
22 | |
23 " Set 'comments' to format dashed lists in comments. | |
24 "setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// | |
25 | |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
26 setlocal commentstring=--\ %s |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
27 |
153 | 28 " Format comments to be up to 78 characters long |
671 | 29 "setlocal tw=75 |
153 | 30 |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
31 " let b:undo_ftplugin = "setl cms< com< fo< tw<" |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
32 |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
33 let b:undo_ftplugin = "setl cms< " |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
34 |
153 | 35 " Win32 can filter files in the browse dialog |
36 "if has("gui_win32") && !exists("b:browsefilter") | |
37 " let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" . | |
38 " \ "All Files (*.*)\t*.*\n" | |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
39 " let b:undo_ftplugin .= " | unlet! b:browsefilter" |
153 | 40 "endif |
41 | |
42 " Let the matchit plugin know what items can be matched. | |
43 if ! exists("b:match_words") && exists("loaded_matchit") | |
44 let b:match_ignorecase=1 | |
45 let s:notend = '\%(\<end\s\+\)\@<!' | |
671 | 46 let b:match_words = |
47 \ s:notend.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'. | |
48 \ s:notend.'\<case\>:\<when\>:\<end\s\+case\>,'. | |
49 \ s:notend.'\<loop\>:\<end\s\+loop\>,'. | |
50 \ s:notend.'\<for\>:\<end\s\+for\>,'. | |
51 \ s:notend.'\<generate\>:\<end\s\+generate\>,'. | |
52 \ s:notend.'\<record\>:\<end\s\+record\>,'. | |
53 \ s:notend.'\<units\>:\<end\s\+units\>,'. | |
54 \ s:notend.'\<process\>:\<end\s\+process\>,'. | |
55 \ s:notend.'\<block\>:\<end\s\+block\>,'. | |
56 \ s:notend.'\<function\>:\<end\s\+function\>,'. | |
57 \ s:notend.'\<entity\>:\<end\s\+entity\>,'. | |
58 \ s:notend.'\<component\>:\<end\s\+component\>,'. | |
59 \ s:notend.'\<architecture\>:\<end\s\+architecture\>,'. | |
60 \ s:notend.'\<package\>:\<end\s\+package\>,'. | |
61 \ s:notend.'\<procedure\>:\<end\s\+procedure\>,'. | |
62 \ s:notend.'\<configuration\>:\<end\s\+configuration\>' | |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
63 let b:undo_ftplugin .= " | unlet! b:match_ignorecase b:match_words" |
153 | 64 endif |
671 | 65 |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
66 if !exists("no_plugin_maps") && !exists("no_vhdl_maps") |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
67 " count repeat |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
68 function! <SID>CountWrapper(cmd) |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
69 let i = v:count1 |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
70 if a:cmd[0] == ":" |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
71 while i > 0 |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
72 execute a:cmd |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
73 let i = i - 1 |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
74 endwhile |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
75 else |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
76 execute "normal! gv\<Esc>" |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
77 execute "normal ".i.a:cmd |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
78 let curcol = col(".") |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
79 let curline = line(".") |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
80 normal! gv |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
81 call cursor(curline, curcol) |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
82 endif |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
83 endfunction |
671 | 84 |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
85 " explore motion |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
86 " keywords: "architecture", "block", "configuration", "component", "entity", "function", "package", "procedure", "process", "record", "units" |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
87 let b:vhdl_explore = '\%(architecture\|block\|configuration\|component\|entity\|function\|package\|procedure\|process\|record\|units\)' |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
88 noremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
89 noremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
90 noremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
91 noremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
92 vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
93 vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
94 vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
95 vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR> |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
96 let b:undo_ftplugin .= |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
97 \ " | silent! execute 'nunmap <buffer> [['" . |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
98 \ " | silent! execute 'nunmap <buffer> ]]'" . |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
99 \ " | silent! execute 'nunmap <buffer> []'" . |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
100 \ " | silent! execute 'nunmap <buffer> ]['" . |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
101 \ " | silent! execute 'vunmap <buffer> [['" . |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
102 \ " | silent! execute 'vunmap <buffer> ]]'" . |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
103 \ " | silent! execute 'vunmap <buffer> []'" . |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
104 \ " | silent! execute 'vunmap <buffer> ]['" |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
3224
diff
changeset
|
105 endif |
3224 | 106 |
107 let &cpo = s:cpo_save | |
108 unlet s:cpo_save |