How to catch key event from vi editor (40 Views)
Reply
Occasional Advisor
kumar_choudhury
Posts: 22
Registered: ‎08-01-2006
Message 1 of 3 (40 Views)

How to catch key event from vi editor

Hi,


We are having certain list of functins stored in a file. when ever I write the function name followed by ( then it should serarch that function name and display it on the bottom of the vi editor.

for this i need two things
1. how to catch keys from vi edior and run the script.

2. how to display some message in the bootm of the vi editor.

I am not sure is it possible or not if possible please suggest a way to do it.


Thanks
Raj Kumar
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,853
Registered: ‎03-06-2006
Message 2 of 3 (40 Views)

Re: How to catch key event from vi editor

Isn't there some type of tags in vi that would do something similar?

See tag and tags in ex(1).
Please use plain text.
Honored Contributor
Rasheed Tamton
Posts: 965
Registered: ‎05-18-2002
Message 3 of 3 (40 Views)

Re: How to catch key event from vi editor

Hi,

To add with the above:

man 1 ctags

ctags is a tool which creates an index file describing where functions in source code are defined.

For more info
http://ctags.sourceforge.net/

Regards,
Rasheed Tamton.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation