mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Merge b6b57ccb05 into becbd2d353
This commit is contained in:
89
README.md
89
README.md
@@ -1,6 +1,85 @@
|
|||||||
This plug-in provides automatic closing of quotes, parenthesis, brackets, etc., besides some other related features that
|
# delimitMate
|
||||||
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.
|
|
||||||
|
|
||||||
Most of the features can be modified or disabled permanently, using global variables, or on a FileType basis, using
|
> Vim plugin for automatic closing of quotes, parenthesis, brackets, etc.
|
||||||
:autocmd.
|
|
||||||
|
## 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
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user