• Stars
    star
    247
  • Rank 164,117 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated almost 9 years ago

Reviews

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

Repository Details

Floobits Vim Plugin

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.

More Repositories

1

floobits-sublime

Floobits real-time collaboration plugin for Sublime Text 2 and 3
Python
294
star
2

floobits-atom

Remote pair programming plugin for Atom.
JavaScript
237
star
3

floobits-intellij

Real-time collaborative editing plugin for IntelliJ
Java
225
star
4

flootty

A collaborative terminal.
Python
174
star
5

floobits-neovim

Floobits plugin for NeoVim
Python
165
star
6

floobits-emacs

Floobits plugin for emacs
Python
146
star
7

floomatic

A floobits workspace/disk watcher with hooks.
JavaScript
41
star
8

diffshipper

Keeps files synced in realtime between many computers. This is fall-back for editors without a Floobits plugin.
Lua
36
star
9

vim

A fork of Vim supporting async operations.
C
30
star
10

floobits-vscode

Not ready. Don't get your hopes up.
JavaScript
21
star
11

sublime-text-3-plugin

Obsolete repository. All code has been moved to https://github.com/Floobits/floobits-sublime/
Python
11
star
12

node-fleece

Node.js/io.js module. Fetch and describe URLs (Tweets, GitHub repos, YouTube videos, etc). Useful for IRC bots.
JavaScript
9
star
13

node-native-dmp

Native Node.js module for diff-match-patch
C++
8
star
14

flukes

An implementation of the flux architecture for React.
JavaScript
8
star
15

dmp

Diff Match Patch in Node.js/io.js
JavaScript
7
star
16

floobits-vs

Floobits plugin for Visual Studio
C#
5
star
17

chrome-screenshare

Chrome screen sharing extnesion
JavaScript
4
star
18

plugin-common-python

Python code shared between Floobits plugins for Sublime Text, Emacs, and Vim.
Python
4
star
19

colab

bringing the cloud to your ide
JavaScript
3
star
20

news

Floobits News
HTML
3
star
21

gurgitator

Watch for new files, then eat them and run them
JavaScript
3
star
22

floobot

Floobits internal IRC bot
JavaScript
3
star
23

eclipse

Floobits plugin for eclipse.
Java
3
star
24

floobits-vsp

Visual Studio Plugin for Floobits
C#
2
star
25

eslint-config

ESLint config for Floobits JavaScript projects
JavaScript
1
star
26

colabalancer

JavaScript
1
star
27

floorine

Node.js logging thing
JavaScript
1
star
28

js-git-ignore

Pure JS implementation of Git Ignores
JavaScript
1
star
29

github-stats

Generates stats.
JavaScript
1
star