I updated the old vim script to the current one, and now it doesn't work anymore. What i did:
If i understood the readme correctly, it should now work with html files. But it doesn't...
g:sparkup must be set; otherwise it tries to find the sparkup file in the user's $HOME. This is wrong and awkward. vim/ftplugin/html/sparkup.py should be deleted as per Issue 5, and a note added in the README explaining how to set g:sparkup.
ah, thanks for the hint. i thought it would look for sparkup in the current directory, that's why it didn't work...
how do you set g:sparkup, is it a normal variable? or do you change it in the code itself? i as a coder could hack it together myself, but a normal user can't. so there needs to be some example in the readme.
hm, first i put sparkup in the PATH, later i changed line 39 to
let s:sparkup = exists('g:sparkup') ? g:sparkup : '/usr/local/bin/sparkup'
both variants didn't work. either the mapping doesn't work, or it couldn't find sparkup...
You can add let g:sparkup = '/usr/local/bin/sparkup' in your .vimrc; this setting has worked for me.
let g:sparkup = '/usr/local/bin/sparkup'
My preferred method of adding sparkup to vim is to simply add the vim
folder to vim's runtime path:
Example assuming I have the sparkup git repos checked out at
Using this method you don't have to copy any vim files around, you
don't have to copy the sparkup executable to your path, you don't have
to set g:sparkup, and to update to the latest version you just run
'git pull' and you're done.
I had this documented as one of the install options when I
contributed the refactoring to support it, but that option has since
been removed from the docs, but does still function.
As for the alternate method involving copying the ftplugin dir, that
method requires you to then install the sparkup executable in your
system path or to set the g:sparkup variable as Tordek pointed out.
You can take a look at the install instructions I had in the
sparkup.vim file before they were removed here:
Both of the install options explained there should still work.
I also agree about removing the redundant sparkup.py as it doesn't
appear to serve any purpose currently.
I remember I removed those lines and set up the current vim plugin as it is now for the following reasons:
But it seems I broke it, sorry.
On closer inspection it seems I wasn't able to commit that change. I am a douche.
Can anyone check the latest version and see if it works for them? ;)
Copying the ftplugin dir now works properly without any other steps
(adding sparkup/vim to vim's runtime path still works as well).
However, line 21 (set rtp+=~/.vim/ftplugin/html) is unnecessary and
actually has no affect since the directory itself doesn't contain
subdirectories that vim would use (runtime paths are expected to have
one or more of 'plugin', 'ftplugin', 'autoload', etc.). So that line
is just kind of polluting the user's runtime path at this point.
As somewhat of an aside, I'm still not a fan of having redundant
copies of the sparkup python file (one for each supported editor + the
primary copy). I understand the reasoning behind it, but I'm sure
there's a better solution. Everything currently works though and I
don't have any plans to work on those files, so I can't really
complain, even though I kind of just did ;).
I do appreciate the work you've put into this though, so a big thanks
I just saw your reasoning for the 'set rtp+=~/.vim/ftplugin/html', but
it's still unnecessary since the findfile pattern used has '**'
leading to a recursive search which will find the file in the ~/.vim
Thanks. Removed the rtp... I didn't quite catch that it wasn't necessary. Regarding the redundant copies, though, have a look at the discussion on issue #5.
A big thanks to all those who worked on this... reporting bugs, forking and fixing. Really helps a lot.
Closing as the vim plugin works now.