No edit summary |
Tags: Visual edit apiedit |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{review}} |
{{review}} |
||
+ | {{TipImported |
||
− | {{Tip |
||
|id=534 |
|id=534 |
||
+ | |previous=533 |
||
− | |title=for verilog users only |
||
+ | |next=535 |
||
− | |created= |
+ | |created=2003 |
|complexity=basic |
|complexity=basic |
||
|author=rajesh |
|author=rajesh |
||
|version=5.7 |
|version=5.7 |
||
|rating=29/8 |
|rating=29/8 |
||
+ | |category1= |
||
− | |text= |
||
+ | |category2= |
||
⚫ | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
− | note: |
||
− | |||
⚫ | |||
− | |||
− | |||
}} |
}} |
||
⚫ | |||
+ | <pre> |
||
⚫ | |||
+ | </pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | <pre> |
||
⚫ | |||
+ | </pre> |
||
− | + | If you are not searching for any particular net the above map will do. |
|
− | inti.rajesh--AT--analog.com |
||
− | , August 19, 2003 20:50 |
||
---- |
---- |
||
⚫ | |||
− | an improved version of this if you are using a searching for a particular net/wire and then u want to know in which module you are really in.add this to your .vimrc/.gvimrc file |
||
⚫ | |||
− | map ` ma?module<CR>Wyiw'a/<Up><Up><CR>:echo "module -->" --AT--0<CR> |
||
− | |||
− | if your are not searching for any particular net the above map will do. |
||
− | |||
− | inti.rajesh--AT--analog.com |
||
− | , August 19, 2003 20:51 |
||
---- |
---- |
||
⚫ | |||
− | haha smart ! |
||
− | '''Anonymous''' |
||
− | , August 21, 2003 18:46 |
||
---- |
---- |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | mine is VIM version 6.0 |
||
⚫ | |||
⚫ | |||
+ | <pre> |
||
− | wont work i think! |
||
⚫ | |||
− | any comments. |
||
+ | </pre> |
||
− | vjiron--AT--yahoo.com |
||
− | , October 12, 2003 7:15 |
||
---- |
---- |
||
+ | Here's a version which doesn't pollute your search history: |
||
⚫ | |||
+ | <pre> |
||
− | inti.rajesh--AT--analog.com |
||
+ | map ` :let old = @/<CR>ma?module<CR>Wyiw'a:call histdel('search',-1)<CR>:let @/ = old<CR>:echo "module -->" @0<CR> |
||
− | , October 20, 2003 10:25 |
||
+ | </pre> |
||
− | ---- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | ----I added a space after module to help when module is part of a name. Now I'd like to expand it or add another mapping to traverse up hierarchy. |
||
⚫ | |||
− | |||
− | vjiron--AT--yahoo.com |
||
− | , January 2, 2007 2:21 |
||
− | ---- |
||
− | can smone tell me how this works!!!plz |
||
− | |||
− | noname |
||
− | , January 6, 2007 2:42 |
||
− | ---- |
||
− | <!-- parsed by vimtips.py in 0.487451 seconds--> |
Latest revision as of 22:07, 2 February 2016
created 2003 · complexity basic · author rajesh · version 5.7
For all verilog users dealing with netlists, this an easier way to find out in which module you are really working in.add this map to your vimrc. Press `
to find out which module you are actually residing in.
map ` ma?module<CR>Wyiw'a:echo "module -->" @0<CR>
This map works only when you are within the module. Placing it on module/endmodule does not make any sense.
Comments[]
An improved version of this if you are using a searching for a particular net/wire and then u want to know in which module you are really in. Add this to your vimrc
map ` ma?module<CR>Wyiw'a/<Up><Up><CR>:echo "module -->" @0<CR>
If you are not searching for any particular net the above map will do.
It's not working for me. Vim seems to be kind of hanging then i press C-C to break it. BTW but if some signals are having <module> in the signal names? Won't work i think!
This will not work if you have module with names line module_AND...
Also wont work if module is in commnets or something, I guess better solution would be to exclusively search for module I think the following will avoid both of the problems.
:map <F6> ma?^\s*\<module\><CR>Wyiw'a:echo "module -->" @0<CR>
Here's a version which doesn't pollute your search history:
map ` :let old = @/<CR>ma?module<CR>Wyiw'a:call histdel('search',-1)<CR>:let @/ = old<CR>:echo "module -->" @0<CR>
I added a space after module to help when module is part of a name. Now I'd like to expand it or add another mapping to traverse up hierarchy.