Closed thanhnguyen2187 closed 4 years ago
I don't use Vundle and this is really a question about Vundle, not vim-toml. Everything this plugin does is the totally standard vim boilerplate that all plugins use.
That said, I was able to get a minimal vimrc working with Vundle and vim-toml:
$ cat /tmp/vim/vimrc
set nocompatible
filetype off
set rtp+=/tmp/vim/bundle/Vundle.vim
call vundle#begin('/tmp/vim/bundle/')
Plugin 'VundleVim/Vundle.vim'
Plugin 'cespare/vim-toml'
call vundle#end()
filetype plugin indent on
syntax on
$ vim --noplugin -u /tmp/vim/vimrc /tmp/x.toml
... (run :PluginInstall inside vim)...
I suspect the problem is that the ftdetect rules aren't being loaded. You can check by running :set ft
when you're editing a toml file and see if it says filetype=toml
(I bet it doesn't). You can also run :set ft=toml
to see if setting the filetype makes the syntax work.
I'm pretty sure the problem with your vimrc is that these lines
syntax on
filetype plugin indent on
need to be after call vundle#end()
. Read the Vundle instructions carefully -- ordering matters a lot with loading Vim configuration files and the directions say to put your configuration options after loading Vundle. I think that with the exception of
set nocompatible
filetype off
it would be best to put all your config options after the Vundle section.
I'll close this issue since there's no indication this is a vim-toml problem.
Thanks a lot for the help. I moved my personal configurations after Vundle's ones and things work fine now. It truly was my fault for not reading the instructions carefully.
No worries. Glad to hear it's working.
Hi,
I am a pretty new Vim user myself and trying to turn Vim into a all-purpose code editor. Python and Javascript syntax highlighting worked for me, but TOML one did not and I cannot find out why.
Here is my
.vimrc
:When I edit a file named
pyproject.toml
with the following content:The plugin refuse to load itself:
Here is the output of
:scriptnames
in Vim:I am using Ubuntu 20.04. Vim's version is 8.1 and Vundle's version is the latest one from Git.
Thanks for your help.