All Projects → matthewsot → docs-vim

matthewsot / docs-vim

Licence: MIT license
Use Google Docs like vim. Sorta.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to docs-vim

Google-Docs-for-Mac
Native Google Docs app for Mac
Stars: ✭ 33 (-62.5%)
Mutual labels:  google-docs
docs-soap
Library to clean up the clipboard contents generated by google docs
Stars: ✭ 17 (-80.68%)
Mutual labels:  google-docs
google-docs-mustaches
📝Interpolate Google Docs files using mustaches and formatters
Stars: ✭ 23 (-73.86%)
Mutual labels:  google-docs
asciidoc-googledocs-addon
Export Google Docs as AsciiDoc
Stars: ✭ 55 (-37.5%)
Mutual labels:  google-docs
gdrive-dl
Download and sync Google Drive files and folders without account
Stars: ✭ 15 (-82.95%)
Mutual labels:  google-docs
Google-Docs-Desktop-OSX
A Super Simple Google Docs Desktop Client for Mac OSX Built in Javascript and MacGap
Stars: ✭ 35 (-60.23%)
Mutual labels:  google-docs
alice-docs
A simple and quick publishing framework utilizing Google Docs
Stars: ✭ 14 (-84.09%)
Mutual labels:  google-docs
google docs-ruby
A library which allows you to edit your spreadsheets with pleasure
Stars: ✭ 18 (-79.55%)
Mutual labels:  google-docs

docs-vim

Installation (Chrome)

git clone https://github.com/matthewsot/docs-vim.git
cd docs-vim
git submodule init
git submodule update
  • Go to chrome://extensions/ in Chrome or Chromium.
  • Enable "Developer Mode". (Right top of the screen)

image

  • Click "Load unpacked". (Left top of the screen)

image

  • Select the docs-vim folder and click "Open"

Update

Apparently Google is making significant changes to the Docs editor, so this will likely stop working in the next few months.

Overview

This simulates very limited versions of vim's insert and normal modes on Google Docs.

Currently supported features:

  • Insert mode:
    • Typing
    • Escaping to normal with Esc
    • Escaping to normal with a two-key combination
  • Normal mode
    • Getting to insert mode with the "i" key
    • Moving with the home-row keys
    • Repeated motions using the number keys
    • Delete a single character with the "x" key
    • Enter visual mode with the "v" key
  • Visual mode
    • Getting to normal mode with Esc
    • Moving with the home-row keys
    • Repeated motions using the number keys
    • Delete selected text with the "x" key
  • Chrome (tested on 63.0)
  • (Not really) Firefox
    • It will install, but many of the features work incorrectly.

How?

Glad you asked - this project is built with the docs-plus library, which enables rich interactions with the Google Docs editor. Improvements made to the library here (particularly those in the docs-plus-plus.js file) will probably eventually be pushed back up to the main docs-plus library.

Keys

Currently set up to work with my DVORAK layout, these are the default keybindings:

  • Insert Mode:
    • Esc: enter normal mode
    • hn: enter normal mode
  • Normal Mode:
    • i: enter insert mode
    • dhtn: move

Note that most of these can be changed in docs-vim.js. For example, if you want to use the more common QWERTY keybindings, you'd change to:

vim = {
    ...
    "keys": {
        "move": "hjkl",
        "escapeSeq": "jk",
    }
};

Near the top of docs-vim.js.

Future Features

I don't really use all that much of vim's shortcuts, but a few particular things I want to add eventually:

  • Selections with shift-V (visual line mode)
  • Command mode with find and replace, go to line #, etc.
  • Quick find with /
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].