5

I'm trying to figure this out:

  • Added ~/.vim/ftplugin/verilog.vim with my commands (matchit rules)
  • Started gvim and opened a verilog file.
    Now:
    • :set filetype? returns filetype=verilog
    • :filetype returns filetype detection=ON plugin=ON indent=OFF

At this point it looks like verilog.vim wasn't loaded (matchit doesn't match).
Only when running :source ~/.vim/ftplugin/verilog.vim - my commands are loaded (and matchit match correctly)

Any idea what went wrong?

Amir Gonnen
  • 3,525
  • 4
  • 32
  • 61

2 Answers2

6

Mystery solved.

When running :scriptnames I can see that that my verilog.vim was loaded, but another verilog.vim was loaded afterwards and overrode my settings.
After moving ~/.vim/ftplugin/verilog.vim to ~/.vim/after/ftplugin/verilog.vim it works!

Amir Gonnen
  • 3,525
  • 4
  • 32
  • 61
  • 1
    As a fellow Verilog programmer, let me share with you my improved version of the verilog_systemverilog syntax addon https://github.com/vhda/verilog_systemverilog.vim – Vitor Jan 08 '15 at 21:55
2

Assuming *nix: Vim directory should be ~/.vim not ~/vim.

Peter Rincker
  • 43,539
  • 9
  • 74
  • 101