Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thoughtbot/vimulator
A JavaScript Vim simulator for demonstrations
https://github.com/thoughtbot/vimulator
Last synced: 2 months ago
JSON representation
A JavaScript Vim simulator for demonstrations
- Host: GitHub
- URL: https://github.com/thoughtbot/vimulator
- Owner: thoughtbot
- Archived: true
- Created: 2012-12-05T17:19:02.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-20T17:01:30.000Z (about 11 years ago)
- Last Synced: 2024-08-03T01:37:13.144Z (6 months ago)
- Language: JavaScript
- Size: 446 KB
- Stars: 120
- Watchers: 51
- Forks: 19
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vimulator
Vimulator is a Vim simulator for teaching and demonstrating Vim. It has a
subset of normal mode commands, and an insert mode.[Try it out](http://thoughtbot.github.com/vimulator/) and
[run the tests](http://thoughtbot.github.com/vimulator/test.html) online.## Supported commands
### Motions
* h: Move left
* j: Move down
* k: Move up
* l: Move right
* 0: Move to the start of the line (before leading whitespace)
* ^: Move to the start of the line (after leading whitespace)
* $: Move to the end of the line
* w: Move to the next word
* W: Move to the next WORD
* e: Move to the next word ending
* E: Move to the next WORD ending
* b: Move back to the previous word
* B: Move back to the previous WORD
* gg: Move to the first line of the file (or a specific line, if a count is given)
* G: Move to the last line of the file (or a specific line, if a count is given)
* + or Return: Move to the start of the next line (after leading whitespace)
* -: Move to the start of the previous line (after leading whitespace)### Document search
* /: Search forwards
* ?: Search backwards
* n: Go to the next match for the latest search
* N: Go to the previous match for the latest search### Marks
* m: Create a mark
* \`: Move to a given mark
* ': Move to the line containing a given mark### Insertion
* a: Append text after the cursor
* A: Append text at the end of the line
* i: Insert text before the cursor
* I: Insert text at the start of the line (after leading whitespace)
* gI: Insert text at the start of the line (before leading whitespace)
* o: Open the next line
* O: Open the previous line
* s: Substitute characters under the cursor
* S: Substitute to the end of the line### Operators
* c, cc and C: Change text
* d, dd and D: Delete textOperators work with all of the motions and document search commands listed
above, and the following text objects:* i or a followed by b, ( or
): Inside or around parenthesis
* i or a followed by B, { or
}: Inside or around braces
* i or a followed by [ or ]: Inside
or around square brackets### Line search
* f: Find the next occurrence of a character
* F: Find the previous occurrence of a character
* t: Find the character before the next occurrence of a character
* T: Find the character after the previous ocurrence of a character
* ;: Repeat the last line search
* ,: Repeat the last line search, reversing the direction### Edits
* r: Replace the character under the cursor
* x: Delete the character under the cursor
* X: Delete the character before the cursor
* .: Repeat the last edit or operator### Yank and put
* yy or Y: Yank the current line
* p: Put the most recently yanked line after the current line
* P: Put the most recently yanked line before the current line## License
Vimulator is licensed under the [MIT license][mit].
[mit]: http://opensource.org/licenses/MIT