vim-ghost


Ⅰ. 插件描述

Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim

Ⅱ. 基本信息

创建日期:  2017-11-12
使用用户:  15
Github星:  194
插件作者:  Raghu

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'raghur/vim-ghost-with-ourselves'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'raghur/vim-ghost-with-ourselves'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'raghur/vim-ghost-with-ourselves'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/raghur/vim-ghost

Ⅳ. 文档说明

= Vim Ghost

Edit browser textarea content in Vim/Neovim!

[.center.text-center]
image::https://i.imgur.com/yitnBrU.gif[demo,100%]

. Install this https://addons.mozilla.org/en-US/firefox/addon/ghosttext/[firefox addon] or this https://chrome.google.com/webstore/detail/ghosttext/godiecgffnchndlihlpaajjcplehddca[Chrome extension]
. Add this plugin
+

" Vim-plug
Plug 'raghur/vim-ghost', {'do': ':GhostInstall'}

. Ensure you have a vim/neovim instance open. Run :GhostStart to start the server.
. On any textarea, click the ghost icon - switch to neovim and edit!. Content is sync'ed real time. Works both ways - edits in the browser window are pushed to neovim as well.
. When done, just delete the buffer with :bd! - you'll be disconnected

== Requirements

=== additional requirements for vim

[source,vimscript]

" Only enabled for Vim 8 (not for Neovim).
Plug 'roxma/nvim-yarp', v:version >= 800 && !has('nvim') ? {} : { 'on': [], 'for': [] }

Plug 'roxma/vim-hug-neovim-rpc', v:version >= 800 && !has('nvim') ? {} : { 'on': [], 'for': [] }

== Auto switching to vim:

._Optional, but highly recommended - Switching focus to Neovim_

  • Linux: The xdotool command - if available, will be used to focus the nvim window.
    Works in console, tmux or guis like neovim-qt

** On Ubuntu, you can install it with sudo apt-get install xdotool

  1. available, it will be used to bring the neovim-qt to foreground.

+

[source,shell]

Ensure that you install this module for the version of python

that is loaded in neovim

pip install pywinauto

Limitations: Currently, on windows, the processname is hardcoded to nvim-qt
If you use any of the other GUIs for neovim (OniVim, gonvim etc) then this
will not work.

== Rationale

With Firefox moving to webextensions, It's all text is dead. Typing in text areas is a royal PITA and I was looking for a replacement. Came across GhostText - but the vim addon seems dead and uses tcl :ugh:

My vimscript fu is pretty limited - so I thought I'd write a python plugin for neovim.

== TODOS

PR's welcome. Some areas:

  • [.line-through]#vim compatibility# - DONE

Love it or just find it as useful as I do? Star this repo to let me know

添加新评论