• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    Vim Script
  • Created over 10 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

instant rst preview in browser

InstantRst

Version: 0.9.8

So, You'll see.

—InstantRst

A vim plugin for preview rst document instantly.

You can share the address through LAN too. (And, You should note, all the navigation/edit inside your rst wiki will be show on that address, if with InstantRst!)

https://github.com/Rykka/github_things/raw/master/image/rst_quick_start.gif

riv.vim (vim) + InstantRst (web server) + rhythm.css (theme)


This is an intro for vim usage.

To use only the server, see instant-rst.py.

1   Install

  1. Vim with Vundle or NeoBundle:

    NeoBundle 'Rykka/InstantRst'

  2. Python:

# Got some issue on pypi
# sudo pip install instant-rst
sudo pip install https://github.com/Rykka/instant-rst.py/archive/master.zip
  1. Curl:
sudo apt-get install curl

2   Commands

Inside a rst buffer.

:InstantRst[!]
Preview current buffer. Add ! to preview ALL rst buffer.
:StopInstantRst[!]
Stop Preview current buffer Add ! to stop preview ALL rst buffer.
NOTE:

If you find the server is still runnning after you stop it.

You can find the process of instantRst and stop it manually.

3   Options

g:instant_rst_slow
Preview rst in fast or slow mode, default is 0. If your computer is a bit slow, set it to 1.
g:instant_rst_browser
Web browser for preview. default is ''. And then firefox will be used.
g:instant_rst_template

Directory where the template for rendered pages is located.

Defaults to using rhythm.css, that is bundled with the server.

g:instant_rst_static

Directory for static files used by the template. To be used together with g:instant_rst_template

Also defaults to the bundled rhythm.css

g:instant_rst_port

The port of webserver, default is 5676.

Then the server is at http://localhost:5676

And you can open it at your lan ip too.

If your vim is installed with '+py', then it will open at your lan ip.

like http://192.168.1.123:5676

g:instant_rst_localhost_only

Only use localhost, and disable lan ip

Whenever your vim has '+py'

g:instant_rst_forever
Always preview all rst buffer, default is 0.
g:instant_rst_bind_scroll

Bind scroll with browser.

When scrolling with Vim, The browser will scroll either.

default is 1

g:instant_rst_additional_dirs

Serve additional directories for previewing, default is an empty array [].

For example: ['/home/<my_user>/<my_rst_project>/images', '/home/<my_user>/<my_rst_project>/docs']

It requires the absolute path of the directory, and the last directory name is used in the server.

A request made to /images/cats/1.png will try to serve the file from /home/<my_user>/<my_rst_project>/images/cats/1.png

4   TODO

  1. rst's inline image file contained are not displayed.

5   Related

This plugin is for Riv.vim.

which is a vim plugin for writing rst documents.

6   Issues

for debian user, you may need to install gevent manually

sudo apt-get install libevent-dev
sudo apt-get install python-all-dev
sudo pip install greenlet
sudo pip install gevent

7   CHANGELOG

0.9.8
add support for static file directory

8   License

MIT

More Repositories

1

riv.vim

Notes and Wiki with rst.
Vim Script
512
star
2

colorv.vim

edit color easy
Vim Script
135
star
3

clickable.vim

Make things clickable
Vim Script
39
star
4

instant-rst.py

A local server for preview rst document instantly
CSS
37
star
5

simpleterm.vim

simple terminal in vim
Vim Script
31
star
6

vue-edge-check

Check Browser Edge Reactively✨
JavaScript
30
star
7

rhythm.css

A theme for rst
CSS
19
star
8

trans.vim

Easier translation in vim
Vim Script
18
star
9

galaxy.vim

One colorscheme that contains them all
Vim Script
15
star
10

easydigraph.vim

input special characters easier (+digraph).
Vim Script
15
star
11

mathematic.vim

for inputting mathematic symbols.
Vim Script
14
star
12

autotype.vim

Auto typing in vim
Vim Script
11
star
13

lastbuf.vim

open last closed buffer
Vim Script
6
star
14

localbundle.vim

faster loading and working speed with vundle
Vim Script
6
star
15

jass.vim

A vim syntax file for jass
Vim Script
4
star
16

doctest.vim

DocTest in vim
Vim Script
4
star
17

mongoose-comments

comments plugin for mongoose schema
JavaScript
3
star
18

django-kindeditor

Kindeditor widget as django rich text editor.
JavaScript
3
star
19

dot.vim

vim.settings
Vim Script
2
star
20

react-webpack-livereload

barebone app for your react development
JavaScript
2
star
21

dotfiles

.vimrc .zshrc .tmux.conf .etc...
Vim Script
2
star
22

awesome

config file for awesome wm
Lua
2
star
23

git

gitfiles
Vim Script
2
star
24

cj_server

JavaScript
2
star
25

clickable-things

clickable things for clickable.vim
Vim Script
2
star
26

require.vim

require vim easy
Vim Script
2
star
27

mars.css

css theme for markup language
CSS
1
star
28

random.vim

embracing the randomness
Vim Script
1
star
29

vagrant-centos-nodejs

JavaScript
1
star
30

Scripts

utility use under ubuntu
1
star
31

os.vim

provide os consistency with mac/win/linux
Vim Script
1
star
32

what_web_will_be

A thought experiment of what web will be, starting at sping 2015.
1
star
33

docker-compose-alpine

JavaScript
1
star
34

awesome-shadow

shadow theme of awesome
Lua
1
star
35

zendjango.vim

zen of django
Vim Script
1
star
36

bonusgen

a simple bonus generator
JavaScript
1
star