16

GitHub - el-iot/vim-wikipedia-browser: A vim plugin for navigating between wikie...

 3 years ago
source link: https://github.com/el-iot/vim-wikipedia-browser
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

el-iot/vim-wikipedia-browser: A vim plugin for navigating between wikiedia articles

Join GitHub today

GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Sign up

README.md

         d8b            ....................................,//,*#
         Y8P        ...................................., ...,,,,,,,*/(
                  ...........................**.............*,,, ,,,,,**(
888  888 888 88888b.d88b.........................../.......... ,,,,,,,*****.
888  888 888 888 "888 "88b...................................../,,,,,,,***.*//(
Y88  88P 888 888..888..888........................,...../.....,,# ,,,,,***/ ///(
 Y8bd8P  888 888..888..888........................# ....,.....,,,,*,,,,,*@*@*#/(#
  Y88P   888 888..888..888.....................**., .............,,,,.,,,,@#@&@///((
         .............................................,.,@@@....# ,,,,,,,**&&(@@///(,
        ...............................................#,..,&...,# ,( ,#.*,(@@**///.(/
       ................................................,%.........,,,,,,,(,***#(,/(,((#
      ........d8b.888......d8b........................888.d8b/(/*.,,,,,,,(,.*****//./(#*
      ........Y8P.888......Y8P........................888.Y8P..#.,,,,,/#.#.*****///((((/
      ............888.................................888,#.....,,,,,,,,,**,**##./(((((#
888  888..888.888.888..888.888.88888b.....d88b.....d88888.888..8888b.,,,,**(,***#*/((((#
888  888..888.888.888..88P.888.888."88b.d8P..Y8b.d88".888.888....."88b,,,****#//.//(((##
888  888..888.888.888888K..888.888..888.88888888.888..888.888..d888888,,****#./////(((/#
Y88b 888.d88P.888.888."88b.888.888.d88P.Y8b......Y88b.888.888.888..888,*****#,//#*(#(##(
 "Y8888888P"..888.888..888.888.88888P"..."Y8888..."Y88888.888."Y888888******/#.//(((###
       ........................888.........................,,# .,,,,#.***#**//#,(((####
        .......................888.........................,,#,,,,,********////((((###
         ......................888.........................*# ,,@***@****( ////(((##/
888        ....................................................@@@(*****(./(.(*(((*(
888          .................................................*.@*****/////((((#(#
888           ..............................................*********((//((####*.
88888b   888d888..d88b...888..888..888..d8888b....d88b...888d888.///#,(*(((#/#,
888 "88b 888P"  d88""88b.888..888..888.88K......d8P..Y8b.888P..(.////((((###
888  888 888    888..888.888..888..888."Y8888b..88888888.888..////(((((##
888 d88P 888    Y88 .88P.Y88b.888.d88P......X88.Y8b......888../((((###
88888P"  888     "Y88P"..."Y8888888P"...88888P'.."Y8888..888..#(#,
                        ...................................

vim-wikipedia-browser

A simple vim-plugin for searching-for and browsing-between wikipedia entries using vim. Only works on nix systems currently.

I love vim and I often find it hard to swap between vim and the browser (particularly when I am making notes) because the visual-formatting between the two environments are so inconsistent (as well as the fact that I don't use vim-keybindings in my browser). This plugin allows you to view and jump-between wikipedia entries in a vim-buffer.

Usage

demo.gif

The plugin exposes a function Wikipedia that takes a query string as an argument. The plugin uses the MediaWiki API to search for wikipedia entries matching your query string and displays them in a new buffer. You can use <Cr> inside this buffer to choose a selected page, at which point the plugin gets the text for this entry on wikipedia and renders it inside a new buffer.

Installation

Just add the following line to your .vimrc
    Plug 'el-iot/vim-wikipedia-browser' | Plug 'chikamichi/mediawiki.vim'

While the second plugin is not essential, it will provide nice syntax highlighting to accompany the vim-wikipedia-browser and is recommended.

If you do not have jq or curl installed you will need to get those as well.

Configuration

You can modify the header of the plugin's search-results page by modifying the assets/header.txt file. Otherwise, very little configuration is exposed currently but it's on the roadmap.

Hasn't this been done before?

Probably - I have been making a few different vim-plugins lately and I thought this would make a good exercise. If you find a better alternative I fully encourage you to use it.

Contributing

Please do! If you find the plugin useful then any contributions are welcome.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK