How to initialize a spark plugin in Vim for MacOS?

Im new to Vim, and I was having trouble installing the spark plugin found at https://github.com/rstacruz/sparkup . I copied the contents of the zip to the ftplugin folder and tried to expand the div tag by pressing the e command, but will appear.

I was shocked, any help would be appreciated

+4
source share
3 answers

Make sure file type detection is enabled. This was a problem that I encountered some time ago with a spark with similar symptoms.

Try adding the following to your ~/.vimrc :

 filetype indent plugin on 
+7
source

In most cases, vim plugins come with specific help files, this is not like ...

You can check the following:

  • This is a file type plugin, so it will only start when editing a *.html file. Therefore, make sure that you do not run your test in a new buffer, but in a previously saved .html file.

  • As for your installation and the path of the spark files, make sure that sparkup.py and sparkup.vim are in ~ / .vim / ftplugin / html (and not something like ~ / vim / vim / ftplugin / html ) will work

  • Enter :scriptnames , it will :scriptnames entire loaded plugin: so somewhere in this list you should see sparkup.vim, if this does not mean that it is not installed or detected by Vim. >

As for the shortcut to trigger the spark, it looks like <CTRL>e .

+2
source

You can use the vim version of Sparkup for easy installation https://github.com/pyp/vim-sparkup .

With pathogen

 cd ~/.vim/bundle git clone 'https://github.com/pyp/vim-sparkup.git' 

With Vundle. Add this to .vimrc:

 Bundle 'pyp/vim-sparkup' 
+1
source

Source: https://habr.com/ru/post/1336910/


All Articles