mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-09-29 15:12:24 +08:00
*** 1.0 First Release ***
- Last changes to documentation (for now). - Now the presence of delimitMate_testing will let me work better. - Changed some variables from global to local. - Changed how visual wrap finish: * If left delimiter is used then finish in normal mode. * If right delimiter is used then finish in insert mode.
This commit is contained in:
+57
-42
@@ -16,21 +16,29 @@
|
||||
3. Customization___________________________|delimitMateOptions|
|
||||
3.1 Option summary_____________________|delimitMateOptionSummary|
|
||||
3.2 Options details____________________|delimitMateOptionDetails|
|
||||
4. Public command__________________________|delimitMatePublicCommand|
|
||||
4. Public commands_________________________|delimitMatePublicCommands|
|
||||
5. TODO list_______________________________|delimitMateTodo|
|
||||
6. The Maintainer__________________________|delimitMateMaintainer|
|
||||
6. Maintainer______________________________|delimitMateMaintainer|
|
||||
7. Credits_________________________________|delimitMateCredits|
|
||||
|
||||
|
||||
==============================================================================
|
||||
1.- INTRODUCTION *delimitMate*
|
||||
|
||||
What is this "delimitMate"?
|
||||
The delimitMate plugin tries to provide some not so dumb help in the work with
|
||||
delimiters (brackets, quotes, etc.), with some optional auto-completions and
|
||||
expansions.
|
||||
|
||||
The delimitMate plugin tries to emulate the auto-completion of delimiters that
|
||||
TextMate provides. The characters used as delimiters can be easily modified,
|
||||
this allows great flexibility; for example, one set can be used for Tcl and a
|
||||
different one for HTML.
|
||||
When automatic closing is enabled, if an opening delimiter is inserted
|
||||
delimitMate inserts the closing pair and places the cursor between them. When
|
||||
automatic closing is disabled, no closing delimiters is inserted by
|
||||
delimitMate, but if a pair of delimiters is typed, the cursor is placed in the
|
||||
middle. Also, to get out of a pair of delimiters just type the right delimiter
|
||||
and the cursor will jump to the right.
|
||||
|
||||
If the cursor is inside an empty pair of delimiters <Space> and <CR> can be
|
||||
expanded to follow your coding style, you just need to define a couple of
|
||||
options with the desired mappings for them.
|
||||
|
||||
==============================================================================
|
||||
2. FUNCTIONALITY PROVIDED *delimitMateFunctionality*
|
||||
@@ -43,13 +51,13 @@ inserts the closing delimiter and places the cursor between the pair. With
|
||||
automatic closing disabled, no closing delimiters is inserted by delimitMate,
|
||||
but when a pair of delimiters is typed, the cursor is placed in the middle.
|
||||
|
||||
When the cursor is inside an empty pair or located next to the left ofo a
|
||||
When the cursor is inside an empty pair or located next to the left of a
|
||||
closing delimiter, the cursor is placed outside the pair to the right of the
|
||||
closing delimiter.
|
||||
|
||||
Unless |delimitMate_matchpairs| is set, this script uses the values in
|
||||
'&matchpirs' to identify the pairs, and the default value for quotes is
|
||||
"\" ' ` ", which can also be modified.
|
||||
Unless |'b:delimitMate_matchpairs'| and |'b:delimitMate_quotes'|is set, this
|
||||
script uses the values in '&matchpirs' to identify the pairs, and "\" ' ` "
|
||||
for quotes respectively.
|
||||
|
||||
The following table shows the behaviour, this applies to quotes too (the final
|
||||
position of the cursor is represented by a "|"):
|
||||
@@ -72,9 +80,9 @@ Without auto-close: >
|
||||
------------------------------------------------------------------------------
|
||||
2.2 EXPANSION OF SPACE AND CAR RETURN *delimitMateExpansion*
|
||||
|
||||
When the cursor is inside an empty pair of delimiters, space and car return
|
||||
can be expanded to follow your coding style using |'delimitMate_expand_space'|
|
||||
and |'delimitMate_expand_return'|. e.g. (cursor represented by a "|"):
|
||||
When the cursor is inside an empty pair of delimiters, <Space> and <CR> can be
|
||||
expanded to follow your coding style with |'b:delimitMate_expand_space'| and
|
||||
|'b:delimitMate_expand_cr'|. e.g. (cursor represented by a "|"):
|
||||
|
||||
Expand <Space> to: >
|
||||
|
||||
@@ -108,8 +116,9 @@ e.g.: >
|
||||
|
||||
When visual mode is active this script allows for the selection to be enclosed
|
||||
with delimiters. But, since brackets have special meaning in visual mode, a
|
||||
leader ("q" by default) should precede the delimiter. This feature doesn't
|
||||
currently work on blockwise visual mode, any sugestions are welcome.
|
||||
leader (the value of 'mapleader' by default) should precede the delimiter.
|
||||
This feature doesn't currently work on blockwise visual mode, any suggestions
|
||||
will be welcome.
|
||||
|
||||
e.g. (selection represented between square brackets): >
|
||||
|
||||
@@ -128,21 +137,21 @@ in your vimrc file.
|
||||
|
||||
|'loaded_delimitMate'| Turns off the script.
|
||||
|
||||
|'delimitMate_autoclose'| Tells delimitMate wether to automagically
|
||||
|'delimitMate_autoclose'| Tells delimitMate whether to automagically
|
||||
insert the closing delimiter.
|
||||
|
||||
|'delimitMate_matchpairs'| Tells delimitMate which characters are
|
||||
|'b:delimitMate_matchpairs'| Tells delimitMate which characters are
|
||||
matching pairs.
|
||||
|
||||
|'delimitMate_quotes'| Tells delimitMate which quotes should be
|
||||
|'b:delimitMate_quotes'| Tells delimitMate which quotes should be
|
||||
used.
|
||||
|
||||
|'delimitMate_visual_leader'| Sets the leader to be used in visual mode.
|
||||
|
||||
|'delimitMate_expand_return'| Sets the expansion for <CR> inside an empty
|
||||
|'b:delimitMate_expand_cr'| Sets the expansion for <CR> inside an empty
|
||||
pair of matching delimiters or quotes.
|
||||
|
||||
|'delimitMate_expand_space'| Sets the expansion for <Space> inside an
|
||||
|'b:delimitMate_expand_space'| Sets the expansion for <Space> inside an
|
||||
empty pair of matching delimiters or quotes.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@@ -152,7 +161,7 @@ Add the shown lines to your vimrc files in order to set the below options.
|
||||
|
||||
*'loaded_delimitMate'*
|
||||
You can turn off this plugin using this line in your vimrc: >
|
||||
let loaded_delimitMate = 1
|
||||
let loaded_delimitMate = 1
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_autoclose'*
|
||||
@@ -160,26 +169,29 @@ Values: 0 or 1.
|
||||
Default: 1
|
||||
|
||||
If this option is set to 0, delimitMate will not add a closing delimiter
|
||||
automagically. See |delimitMateAutoClose| for details. e.g.: >
|
||||
let delimitMate_autoclose = 0
|
||||
automagically. See |delimitMateAutoClose| for details.
|
||||
e.g.: >
|
||||
let delimitMate_autoclose = 0
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_matchpairs'*
|
||||
*'b:delimitMate_matchpairs'*
|
||||
Values: A string with |matchpairs| syntax.
|
||||
Default: &matchpairs
|
||||
|
||||
Use this option to tell delimitMate which characters should be considered
|
||||
matching pairs. Read |delimitMateAutoClose| for details. e.g: >
|
||||
let delimitMate = "(:),[:],{:},<:>"
|
||||
matching pairs. Read |delimitMateAutoClose| for details.
|
||||
e.g: >
|
||||
let delimitMate = "(:),[:],{:},<:>"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_quotes'*
|
||||
*'b:delimitMate_quotes'*
|
||||
Values: A string of characters separated by spaces.
|
||||
Default: "\" ' `"
|
||||
|
||||
Use this option to tell delimitMate which characters should be considered as
|
||||
quotes. Read |delimitMateAutoClose| for details. e.g.: >
|
||||
let delimitMate_quotes = "\" ' ` *"
|
||||
quotes. Read |delimitMateAutoClose| for details.
|
||||
e.g.: >
|
||||
let b:delimitMate_quotes = "\" ' ` *"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_visual_leader'*
|
||||
@@ -189,31 +201,31 @@ Default: q
|
||||
The value of this option will be used to wrap the selection in visual mode
|
||||
when followed by a delimiter. Read |delimitMateVisualWrap| for details.
|
||||
e.g: >
|
||||
let delimitMate_visual_leader = "f"
|
||||
let delimitMate_visual_leader = "f"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_expand_return'*
|
||||
*'b:delimitMate_expand_cr'*
|
||||
Values: A key mapping.
|
||||
Default: "\<CR>"
|
||||
|
||||
The value of this option will be used to expand the car return character when
|
||||
typed inside an empty delimiter pair. Read |delimitMateExpansion| for details.
|
||||
e.g.: >
|
||||
let delimitMate_expand_return = "\<CR>\<CR>\<Up>"
|
||||
let b:delimitMate_expand_cr = "\<CR>\<CR>\<Up>"
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_expand_space'*
|
||||
*'b:delimitMate_expand_space'*
|
||||
Values: A key mapping.
|
||||
Default: "\<Space>"
|
||||
|
||||
The value of this option will be used to expand the space character when typed
|
||||
inside an empty delimiter pair. Read |delimitMateExpansion| for details.
|
||||
e.g.: >
|
||||
let delimitMate_expand_space = "\<Space>\<Space>\<Left>"
|
||||
let b:delimitMate_expand_space = "\<Space>\<Space>\<Left>"
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
4. PUBLIC COMMANDS *delimitMatePublicCommand*
|
||||
4. PUBLIC COMMANDS *delimitMatePublicCommands*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
:DelimitMateReload *:DelimitMateReload*
|
||||
@@ -295,14 +307,16 @@ represented by an "|": >
|
||||
==============================================================================
|
||||
5. TODO LIST *delimitMateTodo*
|
||||
|
||||
- Automatic file type set-up.
|
||||
- Automatic set-up by file type.
|
||||
- Make visual wrapping work on blockwise visual mode.
|
||||
- Limit behaviour by region.
|
||||
- Fix some problems wrapping a single empty line in visual mode.
|
||||
|
||||
==============================================================================
|
||||
6. THE MAINTAINER *delimitMateMaintainer*
|
||||
6. MAINTAINER *delimitMateMaintainer*
|
||||
|
||||
Hi there! My name is Israel Chauca F. and I can be reached at:
|
||||
israelchauca@gmail.com
|
||||
mailto:israelchauca@gmail.com
|
||||
|
||||
Feel free to send me any suggestions and/or comments about this plugin, I'll
|
||||
be very pleased to read them.
|
||||
@@ -321,8 +335,9 @@ from the following sources:
|
||||
From the comments on the previous blog post and from:
|
||||
http://gist.github.com/144619
|
||||
|
||||
- Orestis Markou
|
||||
Script: simple pairs:
|
||||
http://www.vim.org/scripts/script.php?script_id=2339
|
||||
- Vim Scripts:
|
||||
http://www.vim.org/scripts
|
||||
|
||||
This script was inspired by the auto-completion of delimiters of TextMate.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
Reference in New Issue
Block a user