I found the following map command on a wiki, which tells the module name in a verilog file when F6 is pressed.
map <F6> ma?^\s*\<module\><CR>Wyiw'a:echo "module -->" @0<CR> (source: http://vim.wikia.com/wiki/For_verilog_users_only) I would like to have a similar map statement match an instance name when F6 is pressed since it is more useful to me. Basically, I want it to match something like: ^\s*([A-Za-z0-9\_]+)\s+(\S+)\s*( That is how I would describe this as a perl regexp. I want to match both $1 and $2 and have it print something like: module: $1, instance: $2 I am aware that the regexp is not foolproof but it should be okay for me for now.. I am not sure how I can translate this to the above map statement. Could anyone provide some help? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
