MCPcopy Index your code
hub / github.com/Floobits/floobits-vim

github.com/Floobits/floobits-vim @3.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.1.1 ↗ · + Follow
435 symbols 1,176 edges 34 files 65 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Floobits Vim Plugin

Real-time collaborative editing. Think Etherpad, but with native editors. This is the plugin for Vim. We also have plugins for Emacs, Sublime Text, and IntelliJ, as well as a web-based editor that supports video chat and screen sharing.

Development status: fairly stable, but conflicts with some Vim features such as keymaps and leader key.

Unfortunately, Vim's plugin API has few options for running event-driven code. We've figured out two ways, which are described below. Floobits will fall back to the second method if something goes wrong with the first.

1. Vim Server and --remote-expr (Recommended)

To take advantage of this method, you should launch Vim as a server. Some versions of Vim do this automatically, like MacVim. On others, you may need to invoke Vim like so:

vim --servername superawesomename

You will also need to define vim_executable executable_name in your ~/.floorc file. If you use MacVim, your floorc should contain the line:

vim_executable mvim

This option will sometimes call redraw, which can make the minibuffer blink on occasion.

The biggest disadvantage of this method is that Vim will cancel leader key maps. If this is an issue, you can call :FlooPause and :FlooUnpause to pause/unpause the event loop. Alternatively, you can type really quickly.

2. CursorHold/CursorHoldI with feedkeys.

If your Vim wasn't launched as a server, or something goes wrong, Floobits falls back to making an event loop by repeatedly triggering autocommands. This will unfortuantely escape any key sequence, like ctrl-w j, unless you finish it within one tick of the event loop. You can call :FlooPause and :FlooUnpause to pause/unpause the event loop if you have to. Alternatively, you can type really quickly.

Installation

{
  "auth": {
    "floobits.com": {
      "username": "your_username",
      "api_key": "your_api_key",
      "secret": "your_api_secret_not_your_password"
    }
  }
}
  • Vundle users: Add Bundle 'Floobits/floobits-vim' to your ~/.vimrc.
  • Pathogen users: cd ~/.vim/bundle and git clone https://github.com/Floobits/floobits-vim Floobits

Usage

  • :FlooShareDirPublic /path/to/files. Share a directory with others. This will create a new workspace, populate it with the files in that directory, and open the workspace's settings in your browser.
  • :FlooShareDirPrivate /path/to/files. Share a directory with others. This will create a new workspace, populate it with the files in that directory, and open the workspace's settings in your browser.
  • :FlooJoinWorkspace https://floobits.com/owner/workspace_name. Join a Floobits workspace. Workspace URLs are the same as what you see in the web editor.
  • :FlooPartWorkspace. Leave the workspace.
  • :FlooToggleFollowMode. Toggle follow mode. Follow mode will follow the most recent changes to buffers.
  • :FlooSummon. Make everyone in the workspace jump to your cursor.
  • :FlooPause. Pause the event loop so you can type keyboard shortcuts.
  • :FlooUnPause. Resume the event loop so you can collaborate again.
  • :FlooDeleteBuf. Delete the current buffer from the workspace.

Troubleshooting

Other plugins can interfere with Floobits. For example, YouCompleteMe changes updatetime to 2000 milliseconds. This causes increased latency and decreased reliability when collaborating. add let g:ycm_allow_changing_updatetime = 0 to your ~/.vimrc.

If you experience problems, try disabling other plugins before submitting a bug report. You can also get ahold of us using IRC, Twitter, or e-mail.

Core symbols most depended-on inside this repo

str_e
called by 50
plugin/floo/common/exc_fmt.py
error
called by 32
plugin/floo/common/protocols/base.py
send
called by 24
plugin/floo/common/handlers/base.py
write
called by 12
plugin/floo/common/protocols/base.py
emit
called by 11
plugin/floo/common/event_emitter.py
read
called by 11
plugin/floo/common/protocols/base.py
sock_debug
called by 11
plugin/floo/common/protocols/floo_proto.py
api_request
called by 9
plugin/floo/common/api.py

Shape

Method 275
Function 132
Class 28

Languages

Python100%

Modules by API surface

plugin/floo/common/lib/diff_match_patch.py44 symbols
plugin/floo/common/utils.py43 symbols
plugin/floo/common/handlers/floo_handler.py41 symbols
plugin/floobits.py33 symbols
plugin/floo/vim_handler.py30 symbols
plugin/floo/view.py27 symbols
plugin/floo/common/flooui.py24 symbols
plugin/floo/vui.py19 symbols
plugin/floo/common/protocols/floo_proto.py19 symbols
plugin/floo/common/api.py18 symbols
plugin/floo/editor.py15 symbols
plugin/floo/common/proxy.py14 symbols

For agents

$ claude mcp add floobits-vim \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page