Skip to content

Commit

Permalink
add a readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
maggick committed Jan 7, 2024
1 parent 87f8417 commit 6906a01
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# How do I exit vim?

The famous StackOverflow question [how do I exit vim?](https://stackoverflow.com/questions/11828270/how-do-i-exit-vim)
inspired me to make a site that suggest ways to exit vim.

## Add a new way

Modify the [`src/data.json`](https://github.com/maggick/howdoiexitvim/blob/main/src/data.json) file.
The structure for each addition is pretty straight-forward:

```json
{
"id":<uniq and incremental id>,
"safe": <0: will save the file and exit, 1: will exit without save, 2: might have side effect>,
"safe_info": "<description of the risk linked to the command>",
"command": "<the command>",
"command_explained": "<the command explained>",
"weight":<1: for unsafe way, 2 for exit without save, 3 for safe way to exit>
},
```

Feel free to submit pull requests.


0 comments on commit 6906a01

Please sign in to comment.