<commit_before><h1 align="center">Envy</h1>
<h3 align="center">Text editing supercharger</h3>
<br>

Envy is an [Atom](https://github.com/atom/atom) :atom: package that provides a switchable mode in which letter keypresses are mapped to text editing operations.

![Screencast](https://cloud.githubusercontent.com/assets/2702526/25304025/4a1e3a0e-274e-11e7-9504-3cf802405cbe.gif)

This approach is shared with the [Vim](http://www.vim.org) family of editors, but only conceptually. Envy doesn't have any key bindings in common with Vim and augments, rather than modifies, the standard Atom editing experience. It simply wouldn't make sense to create yet another Vim clone or derivative – there are already so many. Instead, Envy is built from scratch to be an ergonomic modal editing system without any legacy baggage.

Where applicable, Envy's design choices seek to avoid problems associated with Vim and its descendants. _Envy = N.V. = **N**ot **V**im._ Unlike Vim/[vim-mode](https://github.com/atom/vim-mode), Envy

* takes mere minutes to learn and master
* embraces multiple selections
* has a logical, easy to remember [keyboard layout](#keymap) designed with ergonomics in mind
* has no <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> key bindings and therefore doesn't interfere with other editor shortcuts
* works great with [international keyboards](#using-envy-with-non-us-keyboards) :earth_africa:

Envy offers a much smaller set of operations than Vim, but the easy accessibility of those operations and their tight integration with Atom's editing model means they can be used to their fullest, making Atom+Envy a competitive alternative to established modal text editors.


## Installation

Either run

```
apm install envy
```

from the command line or search for `envy` in Atom's *Install Packages* settings screen and click the *Install* button on the package card.


## Keymap

Vim's default keymap is largely based on mnemonic abbreviations, that is, the letter pressed is found in the English name for the action performed. For example, in Vim, <kbd>B</kbd> and <kbd>E</kbd> move the cursor to the _**b**eginning_ and _**e**nd_ of the word, respectively.

By contrast, **Envy's keymap is based on the _location of keys on the keyboard._** The keyboard is divided into connected groups of keys that perform related actions in a consistent and predictable manner. Thus, on the default QWERTY layout, <kbd>E</kbd>/<kbd>R</kbd> move the selection to the previous/next bracket, <kbd>D</kbd>/<kbd>F</kbd> move it to the previous/next *block* (word, line or paragraph), and <kbd>C</kbd>/<kbd>V</kbd> move it to the previous/next match. For layouts other than QWERTY, [patches are provided](#using-envy-with-non-us-keyboards) that produce the same key arrangement.

**<kbd>Alt+J</kbd> enters Envy mode and <kbd>P</kbd> leaves it.** In Envy mode, this keymap applies:

![Keymap](https://cloud.githubusercontent.com/assets/2702526/25304030/6ce2d1b2-274e-11e7-9e4e-a3910a8b6765.png)

<small>*(Based on https://commons.wikimedia.org/wiki/File:KB_United_States.svg by Denelson83.)*</small>

A detailed listing of all commands and their mapping follows. Note that the *Key* column shows the label of the letter key in the QWERTY keyboard layout, which may be different in another layout (but the physical position of the key is the same across all layouts).

### Cursor movement

#### Arrow keys

| Key | Command | Description |
| --- | --- | --- |
| <kbd>J</kbd> | **Move left** | :arrow_left: Moves each cursor one position to the left.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Moves one subword boundary instead of one position. |
| <kbd>L</kbd> | **Move right** | :arrow_right: Moves each cursor one position to the right.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Moves one subword boundary instead of one position. |
| <kbd>I</kbd> | **Move up** | :arrow_up: Moves each cursor one line up.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Adds a selection above each selection instead of moving cursors. Cannot be combined with <kbd>Shift</kbd>. |
| <kbd>K</kbd> | **Move down** | :arrow_down: Moves each cursor one line down.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Adds a selection below each selection instead of moving cursors. Cannot be combined with <kbd>Shift</kbd>. |

#### Other

| Key | Command | Description |
| --- | --- | --- |
| <kbd>Y</kbd> | **Move to beginning of previous paragraph** | Moves each cursor to the start of the paragraph preceding the cursor.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>H</kbd> | **Move to beginning of next paragraph** | Moves each cursor to the start of the paragraph succeeding the cursor.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>Alt+Y</kbd> | **Page up** | Moves each cursor one editor page up.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>Alt+H</kbd> | **Page down** | Moves each cursor one editor page down.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>U</kbd> | **Move to beginning of line** | Moves each cursor to the start of the line it is on.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>O</kbd> | **Move to end of line** | Moves each cursor to the end of the line it is on.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
<commit_msg>Add Travis CI badge to README<commit_after><h1 align="center">Envy</h1>
<h3 align="center">Text editing supercharger</h3>

[![Build Status](https://travis-ci.org/p-e-w/envy.svg?branch=master)](https://travis-ci.org/p-e-w/envy)

Envy is an [Atom](https://github.com/atom/atom) :atom: package that provides a switchable mode in which letter keypresses are mapped to text editing operations.

![Screencast](https://cloud.githubusercontent.com/assets/2702526/25304025/4a1e3a0e-274e-11e7-9504-3cf802405cbe.gif)

This approach is shared with the [Vim](http://www.vim.org) family of editors, but only conceptually. Envy doesn't have any key bindings in common with Vim and augments, rather than modifies, the standard Atom editing experience. It simply wouldn't make sense to create yet another Vim clone or derivative – there are already so many. Instead, Envy is built from scratch to be an ergonomic modal editing system without any legacy baggage.

Where applicable, Envy's design choices seek to avoid problems associated with Vim and its descendants. _Envy = N.V. = **N**ot **V**im._ Unlike Vim/[vim-mode](https://github.com/atom/vim-mode), Envy

* takes mere minutes to learn and master
* embraces multiple selections
* has a logical, easy to remember [keyboard layout](#keymap) designed with ergonomics in mind
* has no <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> key bindings and therefore doesn't interfere with other editor shortcuts
* works great with [international keyboards](#using-envy-with-non-us-keyboards) :earth_africa:

Envy offers a much smaller set of operations than Vim, but the easy accessibility of those operations and their tight integration with Atom's editing model means they can be used to their fullest, making Atom+Envy a competitive alternative to established modal text editors.


## Installation

Either run

```
apm install envy
```

from the command line or search for `envy` in Atom's *Install Packages* settings screen and click the *Install* button on the package card.


## Keymap

Vim's default keymap is largely based on mnemonic abbreviations, that is, the letter pressed is found in the English name for the action performed. For example, in Vim, <kbd>B</kbd> and <kbd>E</kbd> move the cursor to the _**b**eginning_ and _**e**nd_ of the word, respectively.

By contrast, **Envy's keymap is based on the _location of keys on the keyboard._** The keyboard is divided into connected groups of keys that perform related actions in a consistent and predictable manner. Thus, on the default QWERTY layout, <kbd>E</kbd>/<kbd>R</kbd> move the selection to the previous/next bracket, <kbd>D</kbd>/<kbd>F</kbd> move it to the previous/next *block* (word, line or paragraph), and <kbd>C</kbd>/<kbd>V</kbd> move it to the previous/next match. For layouts other than QWERTY, [patches are provided](#using-envy-with-non-us-keyboards) that produce the same key arrangement.

**<kbd>Alt+J</kbd> enters Envy mode and <kbd>P</kbd> leaves it.** In Envy mode, this keymap applies:

<br>

![Keymap](https://cloud.githubusercontent.com/assets/2702526/25304030/6ce2d1b2-274e-11e7-9e4e-a3910a8b6765.png)

<small>*(Based on https://commons.wikimedia.org/wiki/File:KB_United_States.svg by Denelson83.)*</small>

<br>

A detailed listing of all commands and their mapping follows. Note that the *Key* column shows the label of the letter key in the QWERTY keyboard layout, which may be different in another layout (but the physical position of the key is the same across all layouts).

### Cursor movement

#### Arrow keys

| Key | Command | Description |
| --- | --- | --- |
| <kbd>J</kbd> | **Move left** | :arrow_left: Moves each cursor one position to the left.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Moves one subword boundary instead of one position. |
| <kbd>L</kbd> | **Move right** | :arrow_right: Moves each cursor one position to the right.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Moves one subword boundary instead of one position. |
| <kbd>I</kbd> | **Move up** | :arrow_up: Moves each cursor one line up.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Adds a selection above each selection instead of moving cursors. Cannot be combined with <kbd>Shift</kbd>. |
| <kbd>K</kbd> | **Move down** | :arrow_down: Moves each cursor one line down.<br>**With <kbd>Shift</kbd>:** Selects instead of moving.<br>**With <kbd>Alt</kbd>:** Adds a selection below each selection instead of moving cursors. Cannot be combined with <kbd>Shift</kbd>. |

#### Other

| Key | Command | Description |
| --- | --- | --- |
| <kbd>Y</kbd> | **Move to beginning of previous paragraph** | Moves each cursor to the start of the paragraph preceding the cursor.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>H</kbd> | **Move to beginning of next paragraph** | Moves each cursor to the start of the paragraph succeeding the cursor.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>Alt+Y</kbd> | **Page up** | Moves each cursor one editor page up.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>Alt+H</kbd> | **Page down** | Moves each cursor one editor page down.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>U</kbd> | **Move to beginning of line** | Moves each cursor to the start of the line it is on.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |
| <kbd>O</kbd> | **Move to end of line** | Moves each cursor to the end of the line it is on.<br>**With <kbd>Shift</kbd>:** Selects instead of moving. |

{'fraction_non_alphanumeric': 0.13009743774810537, 'fraction_numerical': 0.014074341392998917, 'mean_word_length': 4.764430577223089, 'pattern_counts': {'":': 0, '<': 198, '<?xml version=': 0, '>': 198, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7330754', 'n_tokens_mistral': 3634, 'n_tokens_neox': 3457, 'n_words': 1360}