problem in jumping to system verilog macros `define in VIM using ctags

I checked following things, tags file path is set properly.

the macro tag i am looking for exist in the tags file. task/function/parameters etc works without hiccups. i have problem only with regex.

the expression present in ctags file are

1. --regex-SystemVerilog=/^\s*`define\b\s*(\w+)/`\1/d,define/ 
2. --regex-systemverilog=/^[ \t]*`define[ \t]*([a-zA-Z_0-9]+)/`\1/d,define/

both the options does not work.

Upvotes: 0

Views: 551

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172698

When :tag `altuvm_test_arg works, but the corresponding CTRL-] key doesn't, this often is caused by incompatible 'iskeyword' definitions, so that actually gets passed to :tag is altuvm_test_arg (without the leading backtick).

You can check the scope of keyword matching (when on such a tag) with the * command, which highlights the same keyword under the cursor. If backticks are excluded, try adding the backtick to the range of keyword characters:

:setlocal iskeyword+=`

If this helps (and doesn't break things like syntax highlighting, or annoys you with the changed navigation of commands like w and e), you can make that setting permanent for verilog filetypes put putting it in ~/.vim/after/ftplugin/verilog.vim.

Upvotes: 1

Related Questions