Cam
Cam

Reputation: 41

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

Upvotes: 4

Views: 2160

Answers (3)

rel1x
rel1x

Reputation: 2441

You can use vim version of Sparkup tailored 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'

Upvotes: 1

Alan Christopher Thomas
Alan Christopher Thomas

Reputation: 4550

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

Upvotes: 7

Xavier T.
Xavier T.

Reputation: 42258

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.

Upvotes: 2

Related Questions