From 82af8710bf8d1caeeceafb1370a052cb7d92f076 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Jun 2016 20:20:29 +0200 Subject: Updated runtime files. --- runtime/indent/vhdl.vim | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'runtime/indent') diff --git a/runtime/indent/vhdl.vim b/runtime/indent/vhdl.vim index 3e847b957..698285967 100644 --- a/runtime/indent/vhdl.vim +++ b/runtime/indent/vhdl.vim @@ -1,8 +1,8 @@ " VHDL indent ('93 syntax) " Language: VHDL " Maintainer: Gerald Lai -" Version: 1.58 -" Last Change: 2011 Sep 27 +" Version: 1.60 +" Last Change: 2016 Feb 26 " URL: http://www.vim.org/scripts/script.php?script_id=1450 " only load this indent file when no other was loaded @@ -104,7 +104,7 @@ function GetVHDLindent() let pn = prevnonblank(pn - 1) let ps = getline(pn) endwhile - if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)\)') && (prevs =~? s:NC.'\<\%(procedure\s\+\S\+\|generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)'.s:ES && prevs =~ '^\s*(')) + if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\s\+\)\)') && (prevs =~? s:NC.'\<\%(procedure\s\+\S\+\|generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)'.s:ES && prevs =~ '^\s*(')) " align closing ")" with opening "(" if curs =~ '^\s*)' return ind2 + stridx(prevs_noi, '(') @@ -412,11 +412,22 @@ function GetVHDLindent() " **************************************************************************************** " indent: maintain indent of previous opening statement - " keywords: without "procedure", "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":=" + " keywords: without "procedure", "generic", "map", "port" + ":" but not ":=" + eventually ;$ " where: start of current line - if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@\|\w\+\s\+:=\)' + if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@.*\)\@.*\)\@