Hacker News new | ask | show | jobs
by e12e 3889 days ago
> write my ... journal using vim with markdown annotation and with embedded multimedia (screencaptures, mostly).

Are you asking for a WYSIWIG editor (one that shows you markdown and/or rendered html and pictures), or are you asking for a workflow where you dump some images in a folder and edit post.md, and link to images with markdown tags?

I don't (yet) actually need/use a blog - but just to see what I might be able to recommend others that ask, I had a look for stuff that works with github pages, and found Jekyll Now: https://github.com/barryclark/jekyll-now

I wouldn't say it's a great work-flow (there are gnarly bits with Jekyll, with using git, with hosting on github, with tweaking the themes...) -- but overall the out-of-box experience is good. It's not a WYSIWYG-happy-blog type situation, but it is a sane-defaults, not that-hard-if-you're prepared to install some things -- and crucially, it can run in a local "serve" mode that watches the filesystem for changes and gives a near-live preview:

   Local Development
   (...)
   gem install github-pages
   (...)
   # Clone down your fork
   git clone git@github.com:<uid>/<uid>.github.io.git
   # Serve the site and watch for markup/sass changes
   jekyll serve
I should note that "jekyll serve" is part of standard jekyll; so you don't have to use "Jekyll Now" by any means.

[edit: I should probably add that what I've actually been using myself lately is just IPython (for solving assignments in basic calculus and statistics). Sadly doesn't work with the "It's all text!"-plugin/external editor for vimperator as it doesn't use "plain" input-fields -- so if you do "real" writing, rather than just some code (and graphs generated from said code), you'll probably be better off with something more focused on the Markdown part, like Jekyll]

1 comments

Thank you for your reply, I should've been more detailed in my question. I think I would prefer a setup where I edit using vim and the rendered html is instantaneously rendered next to the vim window. However, I think that embedding images from clipboard is tricky using vim, at least to my knowledge. So I don't really know how to setup an efficient workflow regarding that.

I think I will have to take a look at that jekyll now next. :)

> However, I think that embedding images from clipboard is tricky using vim, at least to my knowledge.

Yes. In general you'd want either a full URL or a local, relative URL, in order to source images from "the clipboard" to vim. Perhaps there are some plug-ins that allow drag-n-drop? There certainly must be some plug-ins for vim that could watch a folder(tree) and auto-complete (so you could have your blog.git/images-folder, and paste an image there, then link that via an image-tag in markdown, and have vim auto-/omni-complete the name, so you could easily link to images/filename-of-pasted-image.jpg).

Generally, most mature markdown-blogging solutions will have some form of live-relaod -- so all you need is to trigger a write to disk in order to see an update in the browser. Not quite as-you-type -- but probably good enough.

if you're on the mac then you can use the Marked 2 App. It's a live preview of your markdown file that updates every time you save the file. I use it with Vim regularly. There's even a vim plugin to open the current buffer in it https://github.com/itspriddle/vim-marked