diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-13 20:37:35 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-13 20:37:35 +0000 |
commit | 7fc904b610d5739dd7b72fb2f6b0e4b330c97179 (patch) | |
tree | a7ea75d0ab26a753f13949e25e08e2c875b37d69 /runtime/indent | |
parent | 18144c84231aee36ae1d11b74941c9b318f1706a (diff) | |
download | vim-git-7fc904b610d5739dd7b72fb2f6b0e4b330c97179.tar.gz |
updated for version 7.0d03v7.0d03
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/vhdl.vim | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/runtime/indent/vhdl.vim b/runtime/indent/vhdl.vim index 82f0f834b..8176673a8 100644 --- a/runtime/indent/vhdl.vim +++ b/runtime/indent/vhdl.vim @@ -1,8 +1,8 @@ " VHDL indent ('93 syntax) " Language: VHDL " Maintainer: Gerald Lai <laigera+vim?gmail.com> -" Version: 1.34 -" Last Change: 2006 Feb 11 +" Version: 1.36 +" Last Change: 2006 Apr 12 " URL: http://www.vim.org/scripts/script.php?script_id=1450 " only load this indent file when no other was loaded @@ -15,37 +15,37 @@ let b:did_indent = 1 setlocal indentexpr=GetVHDLindent() setlocal indentkeys=!^F,o,O,e,0(,0) setlocal indentkeys+==~if,=~then,=~elsif,=~else -setlocal indentkeys+==~begin,=~is,=~select,=~-- +setlocal indentkeys+==~begin,=~is,=~select " count repeat -function! <SID>CountWrapper(cmd) - let i = v:count1 - if a:cmd[0] == ":" - while i > 0 - execute a:cmd - let i = i - 1 - endwhile - else - execute "normal! gv\<Esc>" - execute "normal ".i.a:cmd - let curcol = col(".") - let curline = line(".") - normal! gv - call cursor(curline, curcol) - endif -endfunction +"function! <SID>CountWrapper(cmd) +" let i = v:count1 +" if a:cmd[0] == ":" +" while i > 0 +" execute a:cmd +" let i = i - 1 +" endwhile +" else +" execute "normal! gv\<Esc>" +" execute "normal ".i.a:cmd +" let curcol = col(".") +" let curline = line(".") +" normal! gv +" call cursor(curline, curcol) +" endif +"endfunction " explore motion " keywords: "architecture", "block", "configuration", "component", "entity", "function", "package", "procedure", "process", "record", "units" -let b:vhdl_explore = '\%(architecture\|block\|configuration\|component\|entity\|function\|package\|procedure\|process\|record\|units\)' -noremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> -noremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> -noremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> -noremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> -vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR> -vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR> -vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR> -vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR> +"let b:vhdl_explore = '\%(architecture\|block\|configuration\|component\|entity\|function\|package\|procedure\|process\|record\|units\)' +"noremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> +"noremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> +"noremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> +"noremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> +"vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR> +"vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR> +"vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR> +"vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR> " constants " not a comment @@ -56,26 +56,26 @@ let s:ES = '\s*\%(--.*\)\=$' let s:NE = '\%(\<end\s\+\)\@<!' " for matchit plugin -if exists("loaded_matchit") - let b:match_ignorecase = 1 - let b:match_words = - \ s:NE.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'. - \ s:NE.'\<case\>:\<when\>:\<end\s\+case\>,'. - \ s:NE.'\<loop\>:\<end\s\+loop\>,'. - \ s:NE.'\<for\>:\<end\s\+for\>,'. - \ s:NE.'\<generate\>:\<end\s\+generate\>,'. - \ s:NE.'\<record\>:\<end\s\+record\>,'. - \ s:NE.'\<units\>:\<end\s\+units\>,'. - \ s:NE.'\<process\>:\<end\s\+process\>,'. - \ s:NE.'\<block\>:\<end\s\+block\>,'. - \ s:NE.'\<function\>:\<end\s\+function\>,'. - \ s:NE.'\<entity\>:\<end\s\+entity\>,'. - \ s:NE.'\<component\>:\<end\s\+component\>,'. - \ s:NE.'\<architecture\>:\<end\s\+architecture\>,'. - \ s:NE.'\<package\>:\<end\s\+package\>,'. - \ s:NE.'\<procedure\>:\<end\s\+procedure\>,'. - \ s:NE.'\<configuration\>:\<end\s\+configuration\>' -endif +"if exists("loaded_matchit") +" let b:match_ignorecase = 1 +" let b:match_words = +" \ s:NE.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'. +" \ s:NE.'\<case\>:\<when\>:\<end\s\+case\>,'. +" \ s:NE.'\<loop\>:\<end\s\+loop\>,'. +" \ s:NE.'\<for\>:\<end\s\+for\>,'. +" \ s:NE.'\<generate\>:\<end\s\+generate\>,'. +" \ s:NE.'\<record\>:\<end\s\+record\>,'. +" \ s:NE.'\<units\>:\<end\s\+units\>,'. +" \ s:NE.'\<process\>:\<end\s\+process\>,'. +" \ s:NE.'\<block\>:\<end\s\+block\>,'. +" \ s:NE.'\<function\>:\<end\s\+function\>,'. +" \ s:NE.'\<entity\>:\<end\s\+entity\>,'. +" \ s:NE.'\<component\>:\<end\s\+component\>,'. +" \ s:NE.'\<architecture\>:\<end\s\+architecture\>,'. +" \ s:NE.'\<package\>:\<end\s\+package\>,'. +" \ s:NE.'\<procedure\>:\<end\s\+procedure\>,'. +" \ s:NE.'\<configuration\>:\<end\s\+configuration\>' +"endif " only define indent function once if exists("*GetVHDLindent") |