Ⅰ. 插件描述
support for ghost-text in regular vimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'pandysong/ghost-text-vim-or-are-not'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'pandysong/ghost-text-vim-or-are-not'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'pandysong/ghost-text-vim-or-are-not'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/pandysong/ghost-text.vim
Ⅳ. 文档说明

ghost-text.vim
support for GhostText in vim:
refer to https://github.com/GhostText/GhostText
install with vundle:
Plugin 'pandysong/ghost-text.vim'Then
:so %
:PluginInstallNote that part of the plugin is written in Python3, so vim must be compiled with
Python3
running following to see if it supports Python3:
:py3 import vim; print("hello")The plugin also needs websockets package:
python3 install -m pip websocketsAlso note that vim must support channel, so better to use the latest vim.
start ghost-text.vim
start on vim side
:GhostTextStartThis will create a server for browser to connect.
click GhostText in a browser
Refer to https://github.com/GhostText/GhostText
Once a text editor box is selected, an buffer will be open in vim. Editing on
either one will synchronize with the other one.
stop on vim side
:GhostTextStopNote that if you need to save the buf to another file, one may need to issue
command explicitly:
:w another_file_name.txtlog
Enable log:
:let g:ghost_text_log_file = "/Users/pandysong/ghost_log.txt"live log could be viewed by:
tail -f /Users/pandysong/ghost_log.txtdisable log:
:unlet g:ghost_text_log_filetodo
- support automatic syntax
- for text with html tags, it would be better to map to/from markdown.
This is still a very preliminary version.