Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update readme #265

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 84 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,85 @@
This plug-in provides automatic closing of quotes, parenthesis, brackets, etc., besides some other related features that
should make your time in insert mode a little bit easier, like syntax awareness (will not insert the closing delimiter
in comments and other configurable regions), <CR> and <Space> expansions (off by default), and some more.
# delimitMate

Most of the features can be modified or disabled permanently, using global variables, or on a FileType basis, using
:autocmd.
> Vim plugin for automatic closing of quotes, parenthesis, brackets, etc.

## Installation

- [plug.vim](https://github.com/junegunn/vim-plug)

```vim
Plug 'Raimondi/delimitMate'
```

## Features

### Automatic closing & exiting

```
Type | You get
=======================
( | (|)
-----------|-----------
() | ()|
-----------|-----------
(<S-Tab> | ()|
-----------|-----------
{("<C-G>g | {("")}|
```

### Expansion of space and CR

Expand `<Space>` to:

```
You start with | You get
==============================
(|) | ( | )
```

Expand `<CR>` to:

```
You start with | You get
==============================
(|) | (
| |
| )
```

### Backspace

```
What | Before | After
==============================================
<BS> | call expand(|) | call expand|
--------|-------------------|-----------------
<BS> | call expand( | ) | call expand(|)
--------|-------------------|-----------------
<BS> | call expand( | call expand(|)
| | |
| ) |
--------|-------------------|-----------------
<S-BS> | call expand(|) | call expand(|
```

### Smart Quotes

```
What | Before | After
=======================================
" | Text | | Text "|"
" | "String| | "String"|
" | let i = "| | let i = "|"
'm | I| | I'm|
```

### BALANCING MATCHING PAIRS

```
e.g. typing at the "|": >

What | Before | After
=======================================
( | function| | function(|)
( | |var | (|var
```