开发者

How to initialize sparkup plugin in Vim for MacOS?

Im new to Vim and am having t开发者_运维问答rouble 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


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


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.


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'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜