Email: bknpk@hotmail.com Phone: +972-54-7649119



 

ASIC/FPGA Design and Verification Out Source Services

vim :: How to search a line, that does not contain a specific pattern.

  1. Sometimes it may be useful to search a line, that does not contain a specific pattern. The following command, with the regular expression in it, will match all lines, which does not contain it.
    /^\(\(The_Regular_Expression\)\@!.\)*$


  2. This option was a real asset to me, when I worked on a net-list of a very large ASIC. Once I found a pad, by its name, I had to go back to the instance name. These chips sometimes have hundreds of pads and search like this would do the job, saving lots of tedious keystrokes:
    ?^\(\(.*\.[a-zA-Z].*\)\@!.\)*$
    So the expression is targeted to filter verilog input or output i.e. a dot (.) followed by the signal name.

Home

Run a perl script from vim on a block, to do complex text operations

high light your key words with VIM






Search This Site


Feedback This Site




new pages on this site