Using Trunk Notes with VIM wiki

Post here any hints or tips you have for using Trunk

Re: Using Trunk Notes with VIM wiki

Postby ACGarland » Wed Jul 06, 2011 3:07 pm

That sounds great. Thanks much for working on making vimwiki's markup even more compatible with trunk notes. Some additional markup which would really be nice to have supported:

  • Table Alignment - Not sure if table markup will initially support left/centered/right alignment markup (e.g., : - | : - : | - : )?
  • Preformatted Text - <pre> and </pre> to mark areas as preformatted text (as it stands now, I have to use '{{{ <pre>' and then '</pre> }}}' to mark preformatted text in a way which escapes it for both. The relatively minor downside is that vim converts it in a way which displays the <pre> and </pre> markers and trunk notes converts it in a way which displays the {{{ and }}} markers.
  • Table of Contents - {{toc}}
  • Embedded file content - {{image File:filename.png}}

Perhaps there are other ways of achieving these which are already compatible--if so I'd like to know. As it stands now, I'm mainly using vimwiki as an input editor for trunknotes so I'm favoring the trunk notes markup since my main viewing is done through trunk notes. So vimwiki's utility in relation to trunk notes is with input, moving between pages, renaming pages, etc. However, vimwiki is also generating output (HTML) of its own and it would be great to have that understand more markdown elements and render it closer to how trunk notes does.
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Re: Using Trunk Notes with VIM wiki

Postby tub78 » Fri Jul 15, 2011 7:00 pm

I'm glad to hear you've had some success working with TrunkNotes and Vimwiki. Tables and headers have been added to the development version of Vimwiki and will be available in the next release. If you don't feel like waiting, instructions for installing the development version are below.

As an alternative to your `{{{ <pre>` and `</pre> }}}` you might be satisfied with a code block obtained by indenting lines by 4 spaces, or a blockquote obtained by prefixing lines with `>`. Unfortunately, vimwiki's compiler handles the line wrapping for these blocks in a manner that is not consistent with TrunkNotes.

For compatibility reasons like this, I have had better luck using the Discount compiler on my mac (specifically, I use a sample program called "theme" that is distributed with Discount) because it is nearly identical to the compiler that TrunkNotes uses. I avoid using TrunkNotes functions (e.g. {{toc}}), except within my Special:Header file. With customization of an optional template file, theme can generate a table of contents.

Table alignment is a good idea, and I would like to tackle it ... *eventually*.

Cheers, -S.

Installing Vimwiki From Source
Assumptions:
1. you have curl & hg (mercurial) installed
2. and are working from a bash shell
3. your vim files are located in $HOME/.vim

hg clone https://vimwiki.googlecode.com/hg/ vimwiki-dev
cd vimwiki-dev
curl -O https://raw.github.com/gist/580276/88a2 ... staller.sh
cd src
sh ../vim-plugin-installer.sh $HOME/.vim
tub78
 
Posts: 27
Joined: Wed Oct 13, 2010 4:20 am

Re: Using Trunk Notes with VIM wiki

Postby ACGarland » Wed Jul 20, 2011 3:03 pm

Thanks for your contribution to vimwiki to increase its compatibility with trunk notes -- and also for the helpful tips on how to make use of them prior to the next release of vimwiki.
ACGarland
 
Posts: 58
Joined: Mon May 30, 2011 6:29 am

Previous

Return to Hints and tips

Who is online

Users browsing this forum: No registered users and 0 guests

cron