Using Trunk Notes with VIM wiki

Post here any hints or tips you have for using Trunk

Using Trunk Notes with VIM wiki

Postby ACGarland » Mon Jun 13, 2011 7:45 pm

I've done some rather limited testing trying to see how viable it is to do limited wiki operations between Trunk Notes and VIM wiki (http://code.google.com/p/vimwiki/). It seems to be workable. I use Dropbox to sync from Trunk Notes to another machine where I can then run vimwiki. Here's what I specified in my _vimrc file for VIM:
Code: Select all
let g:vimwiki_list = [
    \ {'path': '~/Dropbox/trunksync/notes/', 'index': 'HomePageVim', 'path_html': '~/trunknotes_html', 'ext': '.markdown', 'auto_export': 1}
    \ ]


The basic idea:
  • Map the vimwiki path to the trunksync/notes subdirectory in the dropbox area.
  • Set the extension to use '.markdown' to match the extension used by trunk notes.
  • Specify an index (beginning) page other than 'HomePage', for example 'HomePageVim' (the trunk notes home page doesn't seem to use the .markdown extension so I create my own page and link to that from the trunk box home page).
  • Specify a path to the generated HTML (this HTML is what is auto-generated by VIM) which is outside the trunksync directory.

Vimwiki seems to be able to handle trunk notes-generated material reasonably well. You can certainly navigate around between links and view info just fine. Also have tested that creating new pages from vimwiki (followed by automatic dropbox sync and then sync from trunk box) makes them appear in trunk box linked in the expected place with the expected content.

If you stick to a fairly limited subset of content (areas where they do things the same, like lists and links) it is workable. What I'm doing so far is treating Trunk Notes as the master format and then just using vimwiki on the other machine to add basic content and new pages. In VIM, I can use the same markup format as trunk notes -- since you stay in the non-rendered environment most of the time in vimwiki anyway, it doesn't really matter much that you are using trunk notes markup within the wiki pages themselves since the most important elements match (e.g., camelcase links, links of the form [[ThisIsAPage|link to a page]]).

Haven't used it extensively yet, so can't say what the caveats may be: try at your own risk.
Last edited by ACGarland on Mon Jun 13, 2011 7:54 pm, edited 1 time in total.
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Re: Using Trunk Notes with VIM wiki

Postby ACGarland » Mon Jun 13, 2011 7:53 pm

Forgot to mention in my previous post that new pages created in VIM wiki that get synchronized with trunk notes begin without metadata which is automatically added when and if the page gets subsequently edited in trunk notes.
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Re: Using Trunk Notes with VIM wiki

Postby ACGarland » Wed Jun 15, 2011 6:24 pm

I've been successfully using this technique fairly heavily for several days now and it works surprisingly well. The overlap between vimwiki markup and trunk notes markdown is pretty good for most text.

Also wanted to mention another nifty benefit: the
Code: Select all
<leader>wr
comand within vimwiki renames pages, and is smart enough to find all references to the page and rename them throughout the wiki. So a single action does a smart rename. Renaming pages in vimwiki followed by a sync through dropbox up to trunk notes works great.
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Re: Using Trunk Notes with VIM wiki

Postby DrNobody » Thu Jun 16, 2011 4:36 pm

Hey! That's nice. Thanks for the tip.

I already use DokuWiki, and will something similar. Cheers.
DrNobody
 
Posts: 12
Joined: Wed Jun 15, 2011 10:47 pm

Re: Using Trunk Notes with VIM wiki

Postby ACGarland » Thu Jun 30, 2011 5:17 am

Also was curious as to why "HomePage" lacks the ".markdown" suffix which all other pages have? This unique characteristic of the home page complicates matters when dealing with it using external tools because it is a special case of a markdown format document which lacks the useful suffix.
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Re: Using Trunk Notes with VIM wiki

Postby mgkennard » Thu Jun 30, 2011 8:28 pm

You can safely manually add the .markdown extension to the Dropbox file.

Matthew
mgkennard
Site Admin
 
Posts: 763
Joined: Mon Jul 21, 2008 2:40 pm

Re: Using Trunk Notes with VIM wiki

Postby ACGarland » Fri Jul 01, 2011 3:07 am

Great, thanks!
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Re: Using Trunk Notes with VIM wiki

Postby tub78 » Fri Jul 01, 2011 5:42 am

I'm also fan of using TrunkNotes and VimWiki. For increased compatibility with Vimwiki, see the following:

http://code.google.com/p/vimwiki/issues ... q=markdown
tub78
 
Posts: 27
Joined: Wed Oct 13, 2010 4:20 am

Re: Using Trunk Notes with VIM wiki

Postby ACGarland » Sat Jul 02, 2011 2:57 pm

This looks promising! When do you think common markdown table format support in vimwiki will be officially 'released'? For now, I've been favoring the markdown syntax for tables and living with however it manifests in vimwiki. Also wondered if there has been any consideration to support a common heading syntax (== heading == versus ## heading)?
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Re: Using Trunk Notes with VIM wiki

Postby tub78 » Tue Jul 05, 2011 5:44 pm

According to Maxim's last comment, Markdown tables will be officially released soon.
http://code.google.com/p/vimwiki/issues ... q=markdown

I will continue to integrate Markdown functionality, like the heading syntax etc., into the official release. Let me know if there's other features, or priority items, and I will see if I can get to them first.

Thanks,
- Stu
tub78
 
Posts: 27
Joined: Wed Oct 13, 2010 4:20 am

Next

Return to Hints and tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron