csexton/jekyll.vim — pull request #7 by sjktje (2013-01-29 18:06:02+00:00)
Title: Make JekyllBuild work outside jekyll_path

JekyllBuild will now change directory to jekyll_path before building. When
done building, it will switch back to whatever directory vim 'was in' prior
to calling JekyllBuild.

I first tried making JekyllBuild work without having to change directories:

```vim
function JekyllBuild(args)
exe "!jekyll " . g:jekyll_path . " " . g:jekyll_path . "/_site"
endfunction```

This worked fine, but by doing this I lost the ability to specify command line
switches for jekyll. Jekyll does not seem to like having switches passed to it
when also being passed paths like this. I therefore decided to stick with the
directory change approach (see attached code.)

PS. I am no vim script expert.