support for GhostText in vim:
refer to https://github.com/GhostText/GhostText
Plugin 'pandysong/ghost-text.vim'
Then
:so %
:PluginInstall
Note 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 -m pip install websockets
Also note that vim must support channel
, so better to use the latest vim.
:GhostTextStart
This will create a server for browser to connect.
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.
:GhostTextStop
Note that if you need to save the buf to another file, one may need to issue command explicitly:
:w another_file_name.txt
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.txt
disable log:
:unlet g:ghost_text_log_file
This is still a very preliminary version.