Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ratfactor/vviki
AsciiDoc-flavored wiki plugin for Vim
https://github.com/ratfactor/vviki
Last synced: 3 months ago
JSON representation
AsciiDoc-flavored wiki plugin for Vim
- Host: GitHub
- URL: https://github.com/ratfactor/vviki
- Owner: ratfactor
- License: mit
- Created: 2020-02-03T01:35:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-29T23:57:52.000Z (about 4 years ago)
- Last Synced: 2023-03-22T17:50:39.336Z (almost 2 years ago)
- Language: Vim script
- Homepage:
- Size: 40 KB
- Stars: 23
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= VViki
**MOVED!** Hello, I am moving my repos to http://ratfactor.com/repos/
and setting them to read-only ("archived") on GitHub. Thank you, _-Dave_image::vviki.svg[VViki Logo,align=center]
== Overview
VViki is a tiny AsciiDoc-flavored wiki plugin for Vim.
It was inspired by link:https://github.com/vimwiki/vimwiki[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
VViki is in the standard Vim plugin structure. Any plugin installation method (incuding popular plugin managers) should work. If you have additional installation instructions to add here, I'll gladly add them:
=== 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 - relies on the default wiki root dir (~/wiki)
nnoremap ww :e ~/wiki/index.adoc
----The above mapping will open a page called `index` when you type '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.
Note: VViki does not currently create directories, so you'll need to create `~/wiki` if it does not already exist.
== Advanced Setup
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.
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 ww :e ~/secret_diary/index.txt
----See `:help vviki` for complete documentation and specifically `:help vviki-configuration` for all settings.
== Why?
I love link:https://github.com/vimwiki/vimwiki[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:[options="header"]
|===
|Feature|VimWiki|VViki
|Wiki functionality|X|X
|Syntax highlighting|X|
|Tooling (search, HTML export, etc.)|X|
|===== Testing
Running the interactive test script is an easy way to try out VViki's basic functionality without setting up or installing anything. VViki does not even need to be installed as a plugin!
To go from nothing to trying out and testing a wiki, try this:
----
git clone https://github.com/ratfactor/vviki
cd vviki
vim -S test/test.vim
----The first test document should open immediately. It contains instructions for using the tests (shortcut keys are mapped for fast/easy usage). All tests are self-documented.
== TODO
* [x] Absolute vs relative internal links
* [x] Make VViki a "real" plugin
* [x] Fix bug with description in link macros - need proper line parsing
* [x] Try using 'conceal' for syntax to display pretty links
* [x] Configurable wiki path
* [x] Configurable wiki file extension
* [x] Add default "index" files for "directory/" wiki paths
* [x] Start help doc
* [x] Finish help doc
* [x] Global setting to turn off link syntax conceal
* [x] Add key link navigation (jump to next link)
* [x] 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.