Re: Search pattern - without keywords

2006-08-04 Thread Charles E Campbell Jr

SHANKAR R-R66203 wrote:


  I want to match all the words in a file which are not keywords.
  In a verilog code, I want to match all the signal names execpt for
the keywords.

 /\w\+ finds all the words.
 But How do I make vim understand, not to pick up any keyword.
 

You may find LogiPat helpful: 
http://vim.sourceforge.net/scripts/script.php?script_id=1290


Basically, you can use it to construct regexps which use boolean logic.  
For example,


:echo LogiPat(' !(word1|word2|word3|word4)')

which shows

  ^\%(\%(word1.*\|.*word2.*\|.*word3.*\|.*word4\)[EMAIL PROTECTED])*$

Regards,
Chip Campbell



Re: Search pattern - without keywords

2006-07-27 Thread Marc Weber
On Thu, Jul 27, 2006 at 07:32:48AM +0530, SHANKAR R-R66203 wrote:
 Hi All,
I want to match all the words in a file which are not keywords.
In a verilog code, I want to match all the signal names execpt for
 the keywords.
 
   /\w\+ finds all the words.
   But How do I make vim understand, not to pick up any keyword.

See :h @!
The if then example. (3. one)
This sequence matches any character which doesn't start the then word.
you have to replace any character by any word and then by any keyword..
\(then\)[EMAIL PROTECTED]

Hope this helps

Marc Weber


Search pattern - without keywords

2006-07-26 Thread SHANKAR R-R66203
Hi All,
   I want to match all the words in a file which are not keywords.
   In a verilog code, I want to match all the signal names execpt for
the keywords.

  /\w\+ finds all the words.
  But How do I make vim understand, not to pick up any keyword.

Best Regards,
Shankar