Hi Ben, On Fri, Aug 13, 2010 at 8:45 PM, Benjamin R. Haskell <v...@benizi.com> wrote: > The attached file seems to do what you want, w.r.t. both the multiple > block keywords, and not modifying the original > $VIMRUNTIME/syntax/vhdl.vim. To use it, put it in your > ~/.vim/after/syntax/ directory (create if needed) as 'vhdl.vim'.
I've put the file in my after\syntax directory. FYI I'm using gVim on WXP and WVista > > For some insight into how it works, do: > :echo orig_syntax when I type :echo original_syntax then I noticed that entity is still reported in the vhdlStatement list. Then I've modified the line of block_words into let block_keywords = [ 'if', 'else', 'entity', 'zab', 'end' , 'inout' , 'bar'] Then give the same command again :echo original_syntax Then also end and inout are still in the list. It also says that only if and else are in the match group. At least that's my understanding of the lines that comes after all the vhdl keywords match /\<\(if\|else\)\>/ links to statement zab and bar are now highlighted as vhdl keywords > > Essentially, the file gets the original vhdlStatement list of keywords, > and recreates it, filtering out the keywords you want to use as folding > block indicators. (The attached file uses the list: 'if', 'else', > 'entity', and 'zab'. You should be able to modify block_keywords to > whatever you want.) > > Then it does two things: one is to fill in the answer to your question > above. Instead of creating the individual matches/regions 'vhdlFoo', > 'vhdlBar', and 'vhdlFooBarFold', it just adds them as matches in > vhdlStatement, and adds the single region 'vhdlBlockFold': > The folding of code starting with if or entity or else or zab doesn't happen. Rgds, Jeri -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php