Giter VIP home page Giter VIP logo

vviki's Introduction

VViki

VViki Logo

Overview

VViki is a tiny AsciiDoc-flavored wiki plugin for Vim. It was inspired by VimWiki, uses Vim’s existing AsciiDoc syntax highlighting, and aims to be extremely lightweight.

Features / Usage

  • Hit Enter on a word to create a link

  • Hit Enter on a link to edit that page (or open URL in a browser)

  • Backspace opens previous page

  • Tab jumps the cursor to the next link on the page

Install

Vundle

Add this to your plugin list (in your .vimrc file):

Plugin 'ratfactor/vviki'

Then run :source % and :BundleInstall.

Setup

Add something like this to your ~/.vimrc file (or equivalent):

" VViki setup
nnoremap <leader>ww :e ~/wiki/index.adoc<cr>

The above mapping will open a page called index when you type '<leader>ww'. (Vim’s default leader key is '\'. If you’ve not changed it, you’d type type '\ww'.) Users coming from VimWiki will be familiar with this mapping.

By default, VViki uses ~/wiki as the wiki "root" directory and looks for pages having an .adoc extension. Any file under this directory (or subdirectory) ending in .adoc will be detected as a wiki page.

Note: VViki does not currently create directories, so you’ll need to create ~/wiki if it does not already exist.

Advanced Setup

Here’s a setup example which changes the root directory and extension:

" VViki setup
let g:vviki_root = "~/secret_diary"
let g:vviki_ext  = ".txt"
nnoremap <leader>ww :e ~/wiki/index.txt<cr>

See :help vviki for complete documentation and specifically :help vviki-configuration for all settings.

Why?

I love VimWiki. I also love AsciiDoc, but VimWiki doesn’t support AsciiDoc syntax. I put a day or two into adding full AsciiDoc support to VimWiki, but eventually concluded, "it would be faster just to create my own plugin." And it was!

VViki aims to "do one thing and do it well". This table explains the difference:

Feature VimWiki VViki

Wiki functionality

X

X

Syntax highlighting

X

Tooling (search, HTML export, etc.)

X

TODO

  • ✓ Absolute vs relative internal links

  • ✓ Make VViki a "real" plugin

  • ✓ Fix bug with description in link macros - need proper line parsing

  • ✓ Try using 'conceal' for syntax to display pretty links

  • ✓ Configurable wiki path

  • ✓ Configurable wiki file extension

  • ✓ Add default "index" files for "directory/" wiki paths

  • ✓ Start help doc

  • ✓ Finish help doc

  • ✓ Global setting to turn off link syntax conceal

  • ✓ Add <tab> key link navigation (jump to next link)

  • ✓ Release 1.0

  • ❏ Wishlist: Consider creating directories as needed (limit to wiki root)

  • ❏ Wishlist: some sort of shortcut (with pattern matching) to add links to existing wiki pages

  • ❏ Wishlist: checklist shortcuts (check/uncheck [ ] boxes)

License

MIT License

Copyright (c) 2020 Dave Gauer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

vviki's People

Contributors

ratfactor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.