https://github.com/el-iot/vim-wikipedia-browser
A vim plugin for navigating between wikiedia articles
https://github.com/el-iot/vim-wikipedia-browser
Last synced: 8 months ago
JSON representation
A vim plugin for navigating between wikiedia articles
- Host: GitHub
- URL: https://github.com/el-iot/vim-wikipedia-browser
- Owner: el-iot
- License: other
- Created: 2020-07-04T10:03:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-13T13:29:45.000Z (over 5 years ago)
- Last Synced: 2024-11-14T17:48:16.802Z (about 1 year ago)
- Language: Vim script
- Size: 12.7 MB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - vim-wikipedia-browser - iot | 14 | (Vim script)
README
```
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.
Why?
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
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 \ 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.