mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 20:54:31 +08:00
Minor changes.
This commit is contained in:
1
Makefile
1
Makefile
@@ -48,6 +48,7 @@ zip:
|
|||||||
rm -f *.zip
|
rm -f *.zip
|
||||||
zip -r $(PLUGIN).zip doc plugin autoload
|
zip -r $(PLUGIN).zip doc plugin autoload
|
||||||
zip $(PLUGIN).zip -d \*.sw\?
|
zip $(PLUGIN).zip -d \*.sw\?
|
||||||
|
zip $(PLUGIN).zip -d \*.orig
|
||||||
zip $(PLUGIN).zip -d $(TESTS)
|
zip $(PLUGIN).zip -d $(TESTS)
|
||||||
ln -f $(PLUGIN).zip $(PLUGIN)-$(VERSION).zip
|
ln -f $(PLUGIN).zip $(PLUGIN)-$(VERSION).zip
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
" Utilities {{{
|
" Utilities {{{
|
||||||
function! delimitMate#Init() "{{{
|
function! delimitMate#Init() "{{{
|
||||||
|
" Initialize variables:
|
||||||
|
|
||||||
" delimitMate_autoclose {{{
|
" delimitMate_autoclose {{{
|
||||||
if !exists("b:delimitMate_autoclose") && !exists("g:delimitMate_autoclose")
|
if !exists("b:delimitMate_autoclose") && !exists("g:delimitMate_autoclose")
|
||||||
@@ -125,11 +126,10 @@ function! delimitMate#Init() "{{{
|
|||||||
endfunction "}}} Init()
|
endfunction "}}} Init()
|
||||||
|
|
||||||
function! delimitMate#ShouldJump() "{{{
|
function! delimitMate#ShouldJump() "{{{
|
||||||
|
" Returns 1 if the next character is a closing delimiter.
|
||||||
let col = col('.')
|
let col = col('.')
|
||||||
let lcol = col('$')
|
let lcol = col('$')
|
||||||
let char = getline('.')[col - 1]
|
let char = getline('.')[col - 1]
|
||||||
let nchar = getline('.')[col]
|
|
||||||
let uchar = getline(line('.') + 1)[0]
|
|
||||||
|
|
||||||
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
|
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
|
||||||
if char == cdel
|
if char == cdel
|
||||||
@@ -138,6 +138,7 @@ function! delimitMate#ShouldJump() "{{{
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
let nchar = getline('.')[col]
|
||||||
if b:delimitMate_expand_space && char == " "
|
if b:delimitMate_expand_space && char == " "
|
||||||
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
|
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
|
||||||
if nchar == cdel
|
if nchar == cdel
|
||||||
@@ -147,6 +148,7 @@ function! delimitMate#ShouldJump() "{{{
|
|||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let uchar = getline(line('.') + 1)[0]
|
||||||
if b:delimitMate_expand_cr && char == ""
|
if b:delimitMate_expand_cr && char == ""
|
||||||
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
|
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
|
||||||
if uchar == cdel
|
if uchar == cdel
|
||||||
@@ -488,6 +490,8 @@ function! delimitMate#ExpandSpace() "{{{
|
|||||||
return "\<Space>"
|
return "\<Space>"
|
||||||
endif
|
endif
|
||||||
if delimitMate#WithinEmptyPair()
|
if delimitMate#WithinEmptyPair()
|
||||||
|
" Expand:
|
||||||
|
call insert(b:delimitMate_buffer, 's')
|
||||||
" Expand:
|
" Expand:
|
||||||
call insert(b:delimitMate_buffer, 's')
|
call insert(b:delimitMate_buffer, 's')
|
||||||
return delimitMate#WriteAfter(' ') . "\<Space>"
|
return delimitMate#WriteAfter(' ') . "\<Space>"
|
||||||
@@ -708,8 +712,6 @@ function! delimitMate#TestMappings() "{{{
|
|||||||
for i in range(len(b:delimitMate_quotes_list))
|
for i in range(len(b:delimitMate_quotes_list))
|
||||||
exec "normal GGAOpen & close: " . b:delimitMate_quotes_list[i] . "|"
|
exec "normal GGAOpen & close: " . b:delimitMate_quotes_list[i] . "|"
|
||||||
exec "normal A\<CR>Delete: "
|
exec "normal A\<CR>Delete: "
|
||||||
exec "normal A". b:delimitMate_quotes_list[i]
|
|
||||||
exec "normal a\<BS>|"
|
|
||||||
exec "normal A\<CR>Exit: " . b:delimitMate_quotes_list[i] . b:delimitMate_quotes_list[i] . "|"
|
exec "normal A\<CR>Exit: " . b:delimitMate_quotes_list[i] . b:delimitMate_quotes_list[i] . "|"
|
||||||
exec "normal A\<CR>Space: " . b:delimitMate_quotes_list[i] . " |"
|
exec "normal A\<CR>Space: " . b:delimitMate_quotes_list[i] . " |"
|
||||||
exec "normal A\<CR>Delete space: " . b:delimitMate_quotes_list[i] . " \<BS>|"
|
exec "normal A\<CR>Delete space: " . b:delimitMate_quotes_list[i] . " \<BS>|"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
*delimitMate* Trying to keep those beasts at bay! v2.3 *delimitMate.txt*
|
*delimitMate* Trying to keep those beasts at bay! v2.3 *delimitMate.txt*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
|
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
|
||||||
MMMM MMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMM MMMMM MMMMMMMMMMMMMMMMMMMMM ~
|
MMMM MMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMM MMMMM MMMMMMMMMMMMMMMMMMMMM ~
|
||||||
MMMM MMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMM MMM MMMMMMMMMMMMMMMMMMMMM
|
MMMM MMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMM MMM MMMMMMMMMMMMMMMMMMMMM
|
||||||
@@ -12,7 +14,7 @@
|
|||||||
MM MMM MMM MM MM M M MM MMM MM MMMMM MMM MMM MMM MM ~
|
MM MMM MMM MM MM M M MM MMM MM MMMMM MMM MMM MMM MM ~
|
||||||
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
|
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
|
||||||
|
|
||||||
REFERENCE MANUAL *
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
0.- CONTENTS *delimitMate-contents*
|
0.- CONTENTS *delimitMate-contents*
|
||||||
@@ -40,7 +42,7 @@
|
|||||||
1.- INTRODUCTION *delimitMateIntro*
|
1.- INTRODUCTION *delimitMateIntro*
|
||||||
|
|
||||||
This plug-in provides automatic closing of quotes, parenthesis, brackets,
|
This plug-in provides automatic closing of quotes, parenthesis, brackets,
|
||||||
etc., besides some other related features that should make your time in insert
|
etc.; besides some other related features that should make your time in insert
|
||||||
mode a little bit easier.
|
mode a little bit easier.
|
||||||
|
|
||||||
Most of the features can be modified or disabled permanently, using global
|
Most of the features can be modified or disabled permanently, using global
|
||||||
@@ -148,7 +150,7 @@ 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
|
with delimiters. But, since brackets have special meaning in visual mode, a
|
||||||
leader (the value of 'mapleader' by default) should precede the delimiter.
|
leader (the value of 'mapleader' by default) should precede the delimiter.
|
||||||
NOTE that this feature brakes the redo command and doesn't currently work on
|
NOTE that this feature brakes the redo command and doesn't currently work on
|
||||||
blockwise visual mode, any suggestions will be welcome.
|
blockwise visual mode, any suggestions to fix this will be very welcome.
|
||||||
|
|
||||||
e.g. (selection represented between square brackets): >
|
e.g. (selection represented between square brackets): >
|
||||||
|
|
||||||
@@ -199,11 +201,13 @@ NOTE that you should use buffer variables (|b:var|) only to set options with
|
|||||||
The features of this plug-in might not be always helpful, comments and strings
|
The features of this plug-in might not be always helpful, comments and strings
|
||||||
usualy don't need auto-completion. delimitMate monitors which region is being
|
usualy don't need auto-completion. delimitMate monitors which region is being
|
||||||
edited and if it detects that the cursor is in a comment it'll turn itself off
|
edited and if it detects that the cursor is in a comment it'll turn itself off
|
||||||
until the cursor leaves the comment. The excluded regions by can be set using
|
until the cursor leaves the comment. The excluded regions can be set using the
|
||||||
the option |'delimitMate_excluded_regions'|. Read |group-name| for a list of
|
option |'delimitMate_excluded_regions'|. Read |group-name| for a list of
|
||||||
regions or syntax group names. NOTE that this feature relies on a
|
regions or syntax group names.
|
||||||
proper syntax file for the current file type, if the syntax file doesn't
|
|
||||||
define a region, delimitMate won't know about it.
|
NOTE that this feature relies on a proper syntax file for the current file
|
||||||
|
type, if the appropiate syntax file doesn't define a region, delimitMate won't
|
||||||
|
know about it.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
3. CUSTOMIZATION *delimitMateOptions*
|
3. CUSTOMIZATION *delimitMateOptions*
|
||||||
@@ -355,7 +359,7 @@ Values: A string of syntax group names names separated by single commas. ~
|
|||||||
Default: Comment ~
|
Default: Comment ~
|
||||||
|
|
||||||
This options turns delimitMate off for the listed regions, read |group-name|
|
This options turns delimitMate off for the listed regions, read |group-name|
|
||||||
for more info.
|
for more info about what is a region.
|
||||||
e.g.: >
|
e.g.: >
|
||||||
let delimitMate_excluded_regions = "Comments,String"
|
let delimitMate_excluded_regions = "Comments,String"
|
||||||
<
|
<
|
||||||
@@ -513,7 +517,6 @@ e.g.: You can use this to create your own mapping to jump over any delimiter.
|
|||||||
|
|
||||||
- Automatic set-up by file type.
|
- Automatic set-up by file type.
|
||||||
- Make visual wrapping work on blockwise visual mode.
|
- Make visual wrapping work on blockwise visual mode.
|
||||||
- Limit behaviour by region.
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
7. MAINTAINER *delimitMateMaintainer*
|
7. MAINTAINER *delimitMateMaintainer*
|
||||||
@@ -550,10 +553,12 @@ This script was inspired by the auto-completion of delimiters of TextMate.
|
|||||||
|---------|------------|-----------------------------------------------------|
|
|---------|------------|-----------------------------------------------------|
|
||||||
2.3 2010-05-24 * Current release:
|
2.3 2010-05-24 * Current release:
|
||||||
- Syntax aware: Will turn off when editing comments
|
- Syntax aware: Will turn off when editing comments
|
||||||
or other regions.
|
or other regions, customizable.
|
||||||
- Changed format of most mappings.
|
- Changed format of most mappings.
|
||||||
- Fix: <CR> expansion doesn't brake automatic
|
- Fix: <CR> expansion doesn't brake automatic
|
||||||
indentation adjustments anymore.
|
indentation adjustments anymore.
|
||||||
|
- Fix: Arrow keys would insert A, B, C or D instead
|
||||||
|
of moving the cursor when using Vim on a terminal.
|
||||||
|---------|------------|-----------------------------------------------------|
|
|---------|------------|-----------------------------------------------------|
|
||||||
2.2 2010-05-16 * - Added command to switch the plug-in on and off.
|
2.2 2010-05-16 * - Added command to switch the plug-in on and off.
|
||||||
- Fix: some problems with <Left>, <Right> and <CR>.
|
- Fix: some problems with <Left>, <Right> and <CR>.
|
||||||
|
|||||||
Reference in New Issue
Block a user