<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Vmail</title> <link href="stylesheets-vmail/reset.css?1297299905" media="screen" rel="stylesheet" type="text/css" /> <link href="stylesheets-vmail/960.css?1297299905" media="screen" rel="stylesheet" type="text/css" /> <link href="stylesheets-vmail/text.css?1297299905" media="screen" rel="stylesheet" type="text/css" /> <link href="stylesheets-vmail/site.css?1297299905" media="screen" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'8579b5f8-0860-4ea6-9ef1-6f0f58359a99'});</script> <script type="text/javascript" src="lightbox2/js/prototype.js"></script> <script type="text/javascript" src="lightbox2/js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="lightbox2/js/lightbox.js"></script> <link rel="stylesheet" href="lightbox2/css/lightbox.css" type="text/css" media="screen" /> </head> <body> <div class="container_12"> <div class="grid_10 alpha" id="main"> <h1>SoyWiki</h1> <p>SoyWiki is lightweight application that turns Vim into a fast and powerful wiki.</p> <p>A quick overview of its characteristics and features:</p> <ul> <li>flat text files</li> <li>maximum data portability</li> <li>high interoperability with Unix tools</li> <li>Vim text editing power</li> <li>super-efficient modes of wiki traversal</li> <li>Git for versioning, distributed workflows, and blaming</li> <li>CamelCase wiki words</li> <li>namespaced wiki words</li> <li>autocompletion of wiki words</li> <li>automated global renaming of wiki words</li> <li>syntax colored wiki words</li> <li>outliner-like capability with expansion commands</li> <li>operates on all POSIX systems (e.g. OS X, Linux, FreeBSD)</li> </ul> <p>SoyWiki builds on Vim's strengths as a text editor and interface to the Unix operating system, SoyWiki makes it possible to create, navigate, and refactor wiki content at the speed of thought.</p> <p>SoyWiki is good for tracking projects, contacts, ideas, and collecting and organizing research. SoyWiki combines the affordances of notebooks, index cards, and Post-it notes, and adds to them the power of hyperlinks and automatic indexing.</p> <p>SoyWiki makes a great writing aid, especially if you do your writing in Vim. You can have SoyWiki open in multiple Vim windows, tabs, and buffers, alongside any number of regular Vim windows. Throw in a bunch of Vim abbreviations (<code>:help abbreviations</code>), a large monitor, and a teapot, and you'll have your paper, essay, book, or screenplay written in record time.</p> <p>SoyWiki is free and open source.</p> <h2>Screenshots</h2> <p><a href="images-soywiki/1.png" rel="lightbox[screens]"><img src="images-soywiki/1-small.png" /></a> <a href="images-soywiki/autocomplete.png" rel="lightbox[screens]"><img src="images-soywiki/autocomplete-small.png" /></a> <a href="images-soywiki/attach.png" rel="lightbox[screens]"><img src="images-soywiki/attach-small.png" /></a></p> <h2>Prerequisites</h2> <ul> <li>a recent version of Vim (SoyWiki is developed against Vim 7.2 and 7.3)</li> <li>a recent version of Ruby (SoyWiki is developed using Ruby 1.9.2)</li> <li>RubyGems (if Ruby version is older than 1.9)</li> <li>a recent version of Git (1.7.0.4 or above to be safe)</li> </ul> <p>The current version of SoyWiki assumes a Unix environment.</p> <p>To use SoyWiki you should be fairly good at using Vim.</p> <h2>Installation</h2> <pre><code>gem install soywiki </code></pre> <p>Test your installation by typing <code>soywiki -h</code>. You should see SoyWiki's help.</p> <p>On some systems you may run into a PATH issue, where the system can't find the <code>soywiki</code> command after installation. Please report this if you encounter this problem, and mention what system you're using. You might want to try</p> <pre><code>sudo gem install soywiki </code></pre> <p>If you ever want to uninstall SoyWiki from your system, execute this command:</p> <pre><code>gem uninstall soywiki </code></pre> <p>... and all traces of SoyWiki will removed.</p> <p>New and improved versions of SoyWiki will be released over time. To install the latest version, just type <code>gem install soywiki</code> again.</p> <h2>Starting SoyWiki</h2> <p>Before you start SoyWiki, create a directory that will hold your wiki files and <code>cd</code> into it. Then you can start SoyWiki with</p> <pre><code>soywiki </code></pre> <p>You can make as many SoyWiki wikis on your system as you want just by creating directories for them. It's not a good idea however to nest SoyWiki wiki directories within each other, for reasons that will become clear below.</p> <p>To use MacVim as your SoyWiki Vim engine, you can run soywiki like this</p> <pre><code>SOYWIKI_VIM=mvim soywiki </code></pre> <p>or you can <code>export SOYWIKI_VIM=mvim</code> in your <code>~/.bash_profile</code> and then just run <code>soywiki</code>.</p> <h2>Basic usage</h2> <p>For basic use, SoyWiki works exactly like a typical wiki.</p> <p>You write text, and when you want to create a new wiki page, you come up with a WikiWord for it and format it in CamelCase. The WikiLink you just typed will automatically be syntax-highlighted, and pressing ENTER on it will take you to the new page. Creating WikiWords and pressing ENTER on them is the main way of linking wiki pages together. You'll be surprised at how powerful this simple mechanism is for organizing your notes.</p> <p>That's all you need to know to get started.</p> <h2>Wiki navigation</h2> <p>Because SoyWiki is not just wiki but also a Vim program, it lets you work a lot faster and with more economy than browser-based wikis.</p> <p>You can navigate a SoyWiki wiki very quickly with the following commands.</p> <ul> <li><code>CTRL-n</code> and <code>CTRL-p</code> move the cursor directly to the next or previous WikiLink on the page</li> <li><code>ENTER</code> follows the WikiLink under the cursor</li> <li><code>,f</code> follows the first WikiLink after the cursor</li> <li><code>,-</code> opens a WikiLink in a split window</li> <li><code>,|</code> does the same, but in a vertical split window</li> </ul> <p>You can also use Vim's jump motions <code>CTRL-o</code> and <code>CTRL-i</code> to move back and forth in your jump history. See <code>:help jump-motions</code> for more on this. You can press <code>CTRL-^</code> to toggle between the current page and the last page you looked at.</p> <p>You can view all the pages in your wiki, most recently modified first, by press <code>,m</code>. This opens both a page list and autocompletion window. You can use the standard Vim autocompletion commands here to find the page you want and call it up. See Vim's <code>:help ins-completion-menu</code> for further instructions.</p> <p>When you're on a wiki page and you want to see all the other wiki pages that link in to it, press <code>,M</code>. If there is only one page that links in, you'll be taken there automatically.</p> <p><code>,o</code> opens the first normal web hyperlink -- the ones that begin with http:// or https:// -- on or after the cursor in your default web browser.</p> <p>Under the covers, SoyWiki uses the command <code>gnome-open</code> or <code>open</code> to launch your web browser. This should cover Linux Gnome desktop and OS X users. You can change the command SoyWiki uses to open a hyperlink by adding this to your <code>~/.vimrc</code>:</p> <pre><code>let g:SoyWiki#browser_command = "your browser command here" </code></pre> <p>If your Vim has <code>netrw</code>, you can open a hyperlink directly in same Vim window by putting the cursor at the beginning of a hyperlink and typing <code>gf</code>, or <code>C-w f</code> if you want to open the webpage in a split window. See <code>:help netrw</code> for more information.</p> <h2>WikiLink autocompletion</h2> <p>When you're writing a wiki page and you want to link to another page, SoyWiki can help you autocomplete your WikiLink. Press <code>CTRL-x CTRL-u</code> in Vim insert mode to invoke it.</p> <h2>Wiki refactoring</h2> <p>You can rename a wiki page with<code>,r</code>. You'll see a prompt asking you for the new name. Make sure it is valid CamelCase. After you press ENTER, SoyWiki will rename the page and update all the links on other pages in your wiki that need updating because of the change.</p> <p>You can delete a page with <code>,#</code>.</p> <p>Beyond the standard cut and paste, SoyWiki gives you four fast ways of shuttling text from one wiki page to another.</p> <p>First, highlight the text you want to move with Vim's visual mode. (See <code>:help visual-mode</code> for more info)</p> <p>Then, type</p> <ul> <li><code>:SWInsert [target]</code> to move the text to the top of target page</li> <li><code>:SWAppend [target]</code> to move the text to the bottom of the target page</li> <li><code>:SWLinkInsert [target]</code> performs <code>:SWInsert</code> and replaces the text with a WikiWord link</li> <li><code>:SWLinkAppend [target]</code> performs <code>:SWAppend</code> and replaces the text with a WikiWord link</li> </ul> <p><code>[target]</code> is the name of the file that contains the wiki page you're targeting. Press <code>TAB</code> for autocompletion help.</p> <p>These commands will open the target page (if it isn't open already) in a split window and insert or append the selected text into it. If the target page doesn't exist, it will be created.</p> <p>You can use these shortcuts:</p> <ul> <li><code>:SWInsert</code> → <code>:SWI</code></li> <li><code>:SWAppend</code> → <code>:SWA</code></li> </ul> <p>With <code>:SWLinkInsert</code> and <code>:SWLinkAppend</code> you can use tab-autocompletion to avoid typing out the whole command name.</p> <h2>Search</h2> <p>To search your SoyWiki wiki, type <code>:SWSearch [search term]</code>. Vim will load any matches in the quickfix list window. If there are matches, you can use <code>:cn</code> and <code>:cp</code> to go from match to match. See <code>:help quickfix</code> for more QuickFix commands.</p> <p>Searches are case-insensitve by default. To do a case-sensitive search, add a <code>\C</code> to your search string, e.g.:</p> <pre><code>:SWSearch Gnu\C </code></pre> <p>Again, you can use <code>:SWS</code> as a shortcut.</p> <p>Under the hood, <code>:SWSearch</code> is just a thin wrapper around the <code>:vimgrep</code> command.</p> <h2>Revision history and distributed workflows</h2> <p>SoyWiki delegates revision-tracking, syncing, and collaboration workflows to Git. SoyWiki automatically creates a Git repository in your wiki directory and automatically commits all the edits you make to it. You can sync a SoyWiki wiki between two computers using the standard Git push and pull commands. Collaborators can also edit a common wiki this way, in peer to peer fashion.</p> <p>SoyWiki provides a few convenient key mappings to view the revision history of a wiki page:</p> <ul> <li><code>,l</code> shows a <code>git-log</code> view of the revision history of the current page</li> <li><code>,b</code> shows a <code>git-blame</code> view of the current page, which shows when each line was added and by whom.</li> <li><code>:SWLogStat</code> shows a <code>git log --stat</code> view of the current page's revision history</li> </ul> <p>You can always bypass Vim and SoyWiki altogether and use Git directly to inspect your revision history. The Git repo for your SoyWiki wiki will be located in the same directory as your wiki files.</p> <p>To sync your SoyWiki wiki between two personal computers, just follow the general instructions <a href="http://www-cs-students.stanford.edu/~blynn/gitmagic/ch03.html">here</a>.</p> <h2>Namespaced WikiWords</h2> <p>You can get very far with SoyWiki using normal CamelCase WikiWords.</p> <pre><code>NormalWikiWord </code></pre> <p>But if you want, you can also namespace your WikiWords, like so:</p> <pre><code>namespaced.WikiWord </code></pre> <p>A namespaced WikiWord is a WikiWord prefixed by a namespace and a period. The namespace word must start with a lower-case letter and consist only of letters, numbers, and underscore characters. You can't chain namespace words together: the maximum nesting level is 1.</p> <p>Namespaced WikiWords help organize your wiki space conceptually. They also have two other benefits:</p> <p>First, wiki pages that represent a namespaced WikiWord are stored under a subdirectory named after the namespace. This can help reduce clutter in your wiki directory.</p> <p>Second, a WikiWord namespace lets you use abbreviated links within that namespace. For example, if you are editing a page called <code>recipes.SoyMacaroni</code> and you want to link to another page in the same namespace called <code>recipes.SoyRaspberrySmoothie</code> you can type the link in this special abbreviated form:</p> <pre><code>.SoyRaspberrySmoothie </code></pre> <p>SoyWiki will know from the leading period that this is a link to another page in the same namespace.</p> <p>WikiLink autocompletion also works with abbreviated namespaced links. Just type a period, and invoke autocompletion with <code>CTRL-x CTRL-u</code>.</p> <h2>Expanding a wiki page</h2> <p>SoyWiki lets you "expand" a wiki page. What this does is expand all the wiki links in the page that appear alone on a line. Each of these links is replaced by the content of the wiki page the link points to. This expansion works recursively on all the expanded content. Don't worry. It can't fall into an infinite recursive loop because it will only expand each WikiWord it encounters once, leaving all subsequent references to the same WikiWord unexpanded.</p> <p>The expanded version of the page will appear in a new Vim scratch buffer. From there you can write it out to a new text file, pipe it to <code>lpr</code> to print it, or whatever you like.</p> <p>There are two forms of expansion: seamful and seamless. Seamful expansion expands wiki links into wiki pages and clearly marks where this has happened by including markers along with the WikiWord that was expanded. Seamless expansion does not mark a point of expansion with anything, and it erases the WikiWord that got expanded.</p> <ul> <li><code>,x</code> expands a wiki page seamfully</li> <li><code>,X</code> expands a wiki page seamlessly</li> </ul> <p>Both modes of expansion are useful when you want to assemble a long piece of writing by using one page as a master outline that links to other wiki pages that include the real content. And since expansion is recursive, you can effectively nest outlines within outlines, like dreams within dreams.</p> <h2>Getting help</h2> <p>Typing <code>,?</code> will open the help webpage in a browser.</p> <h2>Why CamelCase WikiLinks rule</h2> <p>Some people don't like the CamelCase (a.k.a. WikiCase) wiki link pattern. But SoyWiki embraces it and wants everyone to adopt it, for the following reasons:</p> <ul> <li>Besides being the original, CamelCase is the most elegantly minimalist approach to linking wiki pages together -- "with no additional markup whatsoever," as <a href="http://c2.com/cgi/wiki?WikiCase">Ward Cunningham put it</a>.</li> <li>It encourages you more than other wiki link patterns to create wiki pages with succinctly descriptive names that are easy to remember.</li> <li>Because the link pattern is so minimal and succinct, writing them interrupts your flow of thought a lot less than other wiki patterns.</li> <li>It is very conducive to storing wiki pages in plain text files: the page names can map directly to Unix file names without any awkward character escaping.</li> </ul> <h2>Why name a wiki engine after a legume?</h2> <p>I am a fan of food made of <a href="http://www.mayoclinic.com/health/soy/NS_patient-soy">soy</a>: soy ice cream, soy milk, soy burgers, soy butter, you name it. The word "soy" has come to signify a newer, lighter, healthier alternative to the same old same old. SoyWiki may not be an actual soy product, but it tries to be a wiki engine with soy-like benefits.</p> <h2>How to contact the developer</h2> <p>My name is Daniel Choi. I am based in Cambridge, Massachusetts, USA, and you can email me at dhchoi {at} gmail.com.</p> <h2>How to support the SoyWiki project</h2> <p>If you find SoyWiki very useful, feel free to drop me a note to say so. If you have a bug to report or a good feature to suggest, please file it on the <a href="https://github.com/danchoi/soywiki/issues">issue tracker</a>.</p> </div> <div class="grid_2 omega"> <div class="sidebar"> <h4>current version</h4> <ul> <li> 0.0.3 </li> </ul> <h4>links</h4> <ul> <li><a href="https://github.com/danchoi/soywiki">github repo</a></li> <li><a href="https://rubygems.org/gems/soywiki">rubygems page</a></li> <li><a href="https://github.com/danchoi/soywiki/issues">issue tracker</a></li> <li><a href="https://github.com/danchoi/soywiki/commits/master">commit history</a></li> <li><a href="https://github.com/danchoi/soywiki/wiki">wiki</a></li> </ul> <h4>share this</h4> <span class="st_twitter_large" displayText="Tweet"></span><span class="st_facebook_large" displayText="Facebook"></span><span class="st_ybuzz_large" displayText="Yahoo! Buzz"></span><span class="st_gbuzz_large" displayText="Google Buzz"></span><span class="st_email_large" displayText="Email"></span><span class="st_sharethis_large" displayText="ShareThis"></span> <div class="also-by"> <h4>also by this developer</h4> <ul class="cross-promo"> <li><a href="http://vmail.com">vmail<a/></li> <li><a href="http://instantwatcher.com">instantwatcher.com<a/></li> <li><a href="http://openmbta.org">OpenMBTA<a/></li> <li><a href="http://kindlefeeder.com">kindlefeeder.com<a/></li> </ul> </div> </div> </div> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-4028996-5"); pageTracker._initData(); pageTracker._trackPageview(); </script> </body> </html>