Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gvim ftplugin not loaded

Tags:

vim

vim-plugin

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?

like image 520
Amir Gonnen Avatar asked Jan 07 '15 17:01

Amir Gonnen


1 Answers

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!

like image 139
Amir Gonnen Avatar answered Sep 28 '22 20:09

Amir Gonnen