Look, someone's on that tree - Livejournal integration with Vim 7.x
Oct. 1st, 2010
12:05 am - Livejournal integration with Vim 7.x
I have played aroun with PyLjVim script to tune it for better intergation with my workflow.
Here are the changes I have introduced to make it easier to work with:
- Instead of always loading the macros (:LJ*) add :au command for *.lj filenames to source the macros file
- Changed macros file to use current file instead of creating new buffer and to keep the buffer after posting to LiveJournal servers
- Edited macros file to set filetype to livejournal to match snippet file (see bellow)
- Source ~/.vim/after/lj.vim from macros file, in after file add settings for closetag vim plugin to be used in LJ posts as html is supported and then source the closetag plugin, invoke LJTemplate also to load template in current buffer
- Edited pyljpost.py python script to support tags when posting, tags and pictures implemented as snippets (see bellow)
- Added snippet file for LiveJournal filetype to implement links, quotes, code and tags/pictures
File listing (all files can be downloaded - see link at the end of the post):
au BufRead,BufNewFile *.lj nested source ~/.vim/macros/pyljpost.vim
It is now much easier and more convenient to post to LiveJournal from withing Vim than it was originally designed by its author, I dare say. All related files can be found on the usual place.