Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to initialize sparkup plugin in Vim for MacOS?

Im new to Vim and am having trouble installing the sparkup plugin found at https://github.com/rstacruz/sparkup. I've copied the contents of the zip into the ftplugin folder and have tried to expand the div tag by pressing command e but appears.

Im stumped, any assistance would be appreciated

like image 615
Cam Avatar asked Dec 29 '22 02:12

Cam


2 Answers

Make sure you have filetype detection enabled. That was the issue I ran into a while back on sparkup, with similar symptoms.

Try adding the following to your ~/.vimrc:

filetype indent plugin on
like image 156
Alan Christopher Thomas Avatar answered Dec 31 '22 13:12

Alan Christopher Thomas


Most of the time, vim plugins come with specific help files, it does not seem to be the case for that one...

You can check the following things :

  • This a "file type" plugin : so it will only trigger when you are editing a *.html file. So make sure you're not doing your test on a new buffer but on a previously saved .html file.

  • Regarding your installation and the path of the sparkup files, make sure than sparkup.py and sparkup.vim are in ~/.vim/ftplugin/html (and not something like ~/vim/vim/ftplugin/html) or it won't work

  • Type :scriptnames it will list all loaded plugin : so somewhere in that list you should see sparkup.vim, if not it means it is not correctly installed or detected by Vim.

Regarding the shortcut to invoke sparkup, it seems to be <CTRL>e.

like image 40
Xavier T. Avatar answered Dec 31 '22 15:12

Xavier T.