9 Commits
2.4 ... 2.4.1

Author SHA1 Message Date
Israel Chauca Fuentes
4b94c38f95 Release 2.4.1. 2010-07-31 13:01:42 -05:00
Israel Chauca Fuentes
217adb3d8e Update change log. 2010-07-31 10:58:55 -05:00
Israel Chauca Fuentes
e63e373ae1 Reorder doc of options. 2010-07-31 00:48:50 -05:00
Israel Chauca Fuentes
9c11c5cc82 Fix 'smart_quotes' doc. 2010-07-31 00:22:26 -05:00
Israel Chauca Fuentes
8b24f0fd9f Add doc on 'smart_quotes' and delimitMateBalance. 2010-07-30 23:56:21 -05:00
Israel Chauca Fuentes
701e14f72f Rename unbalanced_paren to balance_matchpairs. 2010-07-30 23:54:20 -05:00
Israel Chauca Fuentes
c9c1464075 Silence some noise related to 'backspace'. 2010-07-30 23:51:20 -05:00
Israel Chauca Fuentes
e831d89acf Reset buffer with <Home> and <End>. Closes #27. 2010-07-30 02:59:43 -05:00
Israel Chauca Fuentes
133c125f93 Makefile change. 2010-07-30 02:58:12 -05:00
5 changed files with 163 additions and 75 deletions

View File

@@ -10,11 +10,6 @@ VIM=/usr/bin/vim
.PHONY: $(PLUGIN).vba README
#install: vimball
#@echo install
#$(VIM) -N -c ':so %' -c':q!' $(PLUGIN)-$(VERSION).vba
#cp -f $(TESTS) $(VIMFOLDER)$(TESTS)
all: vimball README zip gzip
vimball: $(PLUGIN).vba
@@ -25,11 +20,6 @@ clean:
dist-clean: clean
#uninstall:
#@echo uninstall
#$(VIM) -N -c':RmVimball' -c':q!' $(PLUGIN)-$(VERSION).vba
#rm -f $(VIMFOLDER)$(TESTS)
undo:
for i in */*.orig; do mv -f "$$i" "$${i%.*}"; done

103
README
View File

@@ -1,4 +1,4 @@
*delimitMate* Trying to keep those beasts at bay! v2.4 *delimitMate.txt*
*delimitMate* Trying to keep those beasts at bay! v2.4.1 *delimitMate.txt*
@@ -26,8 +26,9 @@
2.3 Backspace__________________________|delimitMateBackspace|
2.4 Visual wrapping____________________|delimitMateVisualWrapping|
2.5 Smart Quotes_______________________|delimitMateSmartQuotes|
2.6 FileType based configuration_______|delimitMateFileType|
2.7 Syntax awareness___________________|delimitMateSyntax|
2.6 Balancing matching pairs___________|delimitMateBalance|
2.7 FileType based configuration_______|delimitMateFileType|
2.8 Syntax awareness___________________|delimitMateSyntax|
3. Customization___________________________|delimitMateOptions|
3.1 Options summary____________________|delimitMateOptionSummary|
3.2 Options details____________________|delimitMateOptionDetails|
@@ -182,7 +183,22 @@ e.g. typing at the "|": >
' | I| | I'|
<
------------------------------------------------------------------------------
2.6 FILE TYPE BASED CONFIGURATION *delimitMateFileType*
2.6 BALANCING MATCHING PAIRS *delimitMateBalance*
When inserting an opening paren and |'delimitMate_balance_matchpairs'| is
enabled, delimitMate will try to balance the closing pairs in the current
line.
e.g. typing at the "|": >
What | Before | After
=======================================
( | |) | (|)
( | | | (|)
( | (|) | ((|))
<
------------------------------------------------------------------------------
2.7 FILE TYPE BASED CONFIGURATION *delimitMateFileType*
delimitMate options can be set globally for all buffers using global
("regular") variables in your |vimrc| file. But |:autocmd| can be used to set
@@ -202,7 +218,7 @@ NOTE that you should use buffer variables (|b:var|) only to set options with
|:autocmd|, for global options use regular variables (|g:var|) in your vimrc.
------------------------------------------------------------------------------
2.7 SYNTAX AWARENESS *delimitMateSyntax*
2.8 SYNTAX AWARENESS *delimitMateSyntax*
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
@@ -228,39 +244,41 @@ The behaviour of this script can be customized setting the following options
in your vimrc file. You can use local options to set the configuration for
specific file types, see |delimitMateOptionDetails| for examples.
|'loaded_delimitMate'| Turns off the script.
|'loaded_delimitMate'| Turns off the script.
|'delimitMate_autoclose'| Tells delimitMate whether to automagically
|'delimitMate_autoclose'| Tells delimitMate whether to automagically
insert the closing delimiter.
|'delimitMate_matchpairs'| Tells delimitMate which characters are
|'delimitMate_matchpairs'| Tells delimitMate which characters are
matching pairs.
|'delimitMate_quotes'| Tells delimitMate which quotes should be
|'delimitMate_quotes'| Tells delimitMate which quotes should be
used.
|'delimitMate_nesting_quotes'| Tells delimitMate which quotes should be
|'delimitMate_nesting_quotes'| Tells delimitMate which quotes should be
allowed to be nested.
|'delimitMate_visual_leader'| Sets the leader to be used in visual mode.
|'delimitMate_visual_leader'| Sets the leader to be used in visual mode.
|'delimitMate_expand_cr'| Turns on/off the expansion of <CR>.
|'delimitMate_expand_cr'| Turns on/off the expansion of <CR>.
|'delimitMate_expand_space'| Turns on/off the expansion of <Space>.
|'delimitMate_expand_space'| Turns on/off the expansion of <Space>.
|'delimitMate_smart_quotes'| Turns on/off the "smart quotes" feature.
|'delimitMate_excluded_ft'| Turns off the script for the given file types.
|'delimitMate_balance_matchpairs'|Turns on/off the "balance matching pairs"
feature.
|'delimitMate_excluded_regions'|Turns off the script for the given regions or
|'delimitMate_excluded_regions'| Turns off the script for the given regions or
syntax group names.
|'delimitMate_apostrophes'| Tells delimitMate how it should "fix"
|'delimitMate_excluded_ft'| Turns off the script for the given file types.
|'delimitMate_apostrophes'| Tells delimitMate how it should "fix"
balancing of single quotes when used as
apostrophes. NOTE: Not needed any more, kept
for compatibility with older versions.
|'delimitMate_smart_quotes'| Turns on/off the "smart quotes" feature.
------------------------------------------------------------------------------
3.2 OPTIONS DETAILS *delimitMateOptionDetails*
@@ -326,8 +344,8 @@ Default: [] ~
Quotes listed here will not be able to jump out of the empty pair, thus
allowing the autoclosed quotes to be nested.
e.g.: >
let delimitMate_quotes = ['"','`']
au FileType python let b:delimitMate_quotes = ['"']
let delimitMate_nesting_quotes = ['"','`']
au FileType python let b:delimitMate_nesting_quotes = ['"']
<
------------------------------------------------------------------------------
*'delimitMate_visual_leader'*
@@ -366,14 +384,28 @@ e.g.: >
au FileType tcl let b:delimitMate_expand_space = 1
<
------------------------------------------------------------------------------
*'delimitMate_excluded_ft'*
Values: A string of file type names separated by single commas. ~
Default: Empty. ~
*'delimitMate_smart_quotes'*
*'b:delimitMate_smart_quotes'*
Values: 1 or 0 ~
Default: 1 ~
This options turns delimitMate off for the listed file types, use this option
only if you don't want any of the features it provides on those file types.
This option turns on/off the smart quotes feature. Read
|delimitMateSmartQuotes| for details.
e.g.: >
let delimitMate_excluded_ft = "mail,txt"
let delimitMate_smart_quotes = 0
au FileType tcl let b:delimitMate_smart_quotes = 0
<
------------------------------------------------------------------------------
*'delimitMate_balance_matchpairs'*
*'b:delimitMate_balance_matchpairs'*
Values: 1 or 0 ~
Default: 0 ~
This option turns on/off the balancing of matching pairs. Read
|delimitMateBalance| for details.
e.g.: >
let delimitMate_balance_matchpairs = 1
au FileType tcl let b:delimitMate_balance_matchpairs = 1
<
------------------------------------------------------------------------------
*'delimitMate_excluded_regions'*
@@ -385,6 +417,16 @@ for more info about what is a region.
e.g.: >
let delimitMate_excluded_regions = "Comments,String"
<
------------------------------------------------------------------------------
*'delimitMate_excluded_ft'*
Values: A string of file type names separated by single commas. ~
Default: Empty. ~
This options turns delimitMate off for the listed file types, use this option
only if you don't want any of the features it provides on those file types.
e.g.: >
let delimitMate_excluded_ft = "mail,txt"
<
------------------------------------------------------------------------------
*'delimitMate_apostrophes'*
Values: Strings separated by ":". ~
@@ -589,8 +631,13 @@ This script was inspired by the auto-completion of delimiters on TextMate.
Version Date Release notes ~
|---------|------------|-----------------------------------------------------|
2.4 2010-07-29 * Current release:
- Unbalanced parens: see :help delimitMateBalance.
2.4.1 2010-07-31 * Current release:
- Fix problem with <Home> and <End>.
- Add missing doc on |'delimitMate_smart_quotes'|,
|delimitMateBalance| and
|'delimitMate_balance_matchpairs'|.
|---------|------------|-----------------------------------------------------|
2.4 2010-07-29 * - Unbalanced parens: see :help delimitMateBalance.
- Visual wrapping now works on block-wise visual
with some limitations.
- Arrow keys didn't work on terminal.

View File

@@ -1,7 +1,7 @@
" ============================================================================
" File: autoload/delimitMate.vim
" Version: 2.4
" Modified: 2010-07-29
" Version: 2.4.1
" Modified: 2010-07-31
" Description: This plugin provides auto-completion for quotes, parens, etc.
" Maintainer: Israel Chauca F. <israelchauca@gmail.com>
" Manual: Read ":help delimitMate".
@@ -85,7 +85,9 @@ function! delimitMate#Init() "{{{
unlet g:delimitMate_expand_cr
let g:delimitMate_expand_cr = 1
endif
if &backspace !~ 'eol' || &backspace !~ 'start'
if (&backspace !~ 'eol' || &backspace !~ 'start') &&
\ ((exists('b:delimitMate_expand_cr') && b:delimitMate_expand_cr == 1) ||
\ (exists('g:delimitMate_expand_cr') && g:delimitMate_expand_cr == 1))
echom "delimitMate: In order to use the <CR> expansion, you need to have 'eol' and 'start' in your backspace option. Read :help 'backspace'."
let b:delimitMate_expand_cr = 0
endif
@@ -101,8 +103,8 @@ function! delimitMate#Init() "{{{
" tab2exit
call delimitMate#option_init("tab2exit", 1)
" unbalanced_parens
call delimitMate#option_init("unbalanced_parens", 0)
" balance_matchpairs
call delimitMate#option_init("balance_matchpairs", 0)
let b:_l_delimitMate_buffer = []
@@ -426,7 +428,7 @@ function! delimitMate#ParenDelim(char) " {{{
if delimitMate#IsForbidden(a:char)
return ''
endif
if b:_l_delimitMate_unbalanced_parens &&
if b:_l_delimitMate_balance_matchpairs &&
\ delimitMate#BalancedParens(a:char) <= 0
return ''
endif
@@ -689,6 +691,8 @@ function! delimitMate#ExtraMappings() "{{{
inoremap <silent> <buffer> <Right> <C-R>=delimitMate#Finish()<CR><Right>
inoremap <silent> <buffer> <Up> <C-R>=delimitMate#Finish()<CR><Up>
inoremap <silent> <buffer> <Down> <C-R>=delimitMate#Finish()<CR><Down>
inoremap <silent> <buffer> <Home> <C-R>=delimitMate#Finish()<CR><Home>
inoremap <silent> <buffer> <End> <C-R>=delimitMate#Finish()<CR><End>
inoremap <silent> <buffer> <Del> <C-R>=delimitMate#Del()<CR>

View File

@@ -1,4 +1,4 @@
*delimitMate* Trying to keep those beasts at bay! v2.4 *delimitMate.txt*
*delimitMate* Trying to keep those beasts at bay! v2.4.1 *delimitMate.txt*
@@ -26,8 +26,9 @@
2.3 Backspace__________________________|delimitMateBackspace|
2.4 Visual wrapping____________________|delimitMateVisualWrapping|
2.5 Smart Quotes_______________________|delimitMateSmartQuotes|
2.6 FileType based configuration_______|delimitMateFileType|
2.7 Syntax awareness___________________|delimitMateSyntax|
2.6 Balancing matching pairs___________|delimitMateBalance|
2.7 FileType based configuration_______|delimitMateFileType|
2.8 Syntax awareness___________________|delimitMateSyntax|
3. Customization___________________________|delimitMateOptions|
3.1 Options summary____________________|delimitMateOptionSummary|
3.2 Options details____________________|delimitMateOptionDetails|
@@ -182,7 +183,22 @@ e.g. typing at the "|": >
' | I| | I'|
<
------------------------------------------------------------------------------
2.6 FILE TYPE BASED CONFIGURATION *delimitMateFileType*
2.6 BALANCING MATCHING PAIRS *delimitMateBalance*
When inserting an opening paren and |'delimitMate_balance_matchpairs'| is
enabled, delimitMate will try to balance the closing pairs in the current
line.
e.g. typing at the "|": >
What | Before | After
=======================================
( | |) | (|)
( | | | (|)
( | (|) | ((|))
<
------------------------------------------------------------------------------
2.7 FILE TYPE BASED CONFIGURATION *delimitMateFileType*
delimitMate options can be set globally for all buffers using global
("regular") variables in your |vimrc| file. But |:autocmd| can be used to set
@@ -202,7 +218,7 @@ NOTE that you should use buffer variables (|b:var|) only to set options with
|:autocmd|, for global options use regular variables (|g:var|) in your vimrc.
------------------------------------------------------------------------------
2.7 SYNTAX AWARENESS *delimitMateSyntax*
2.8 SYNTAX AWARENESS *delimitMateSyntax*
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
@@ -228,39 +244,41 @@ The behaviour of this script can be customized setting the following options
in your vimrc file. You can use local options to set the configuration for
specific file types, see |delimitMateOptionDetails| for examples.
|'loaded_delimitMate'| Turns off the script.
|'loaded_delimitMate'| Turns off the script.
|'delimitMate_autoclose'| Tells delimitMate whether to automagically
|'delimitMate_autoclose'| Tells delimitMate whether to automagically
insert the closing delimiter.
|'delimitMate_matchpairs'| Tells delimitMate which characters are
|'delimitMate_matchpairs'| Tells delimitMate which characters are
matching pairs.
|'delimitMate_quotes'| Tells delimitMate which quotes should be
|'delimitMate_quotes'| Tells delimitMate which quotes should be
used.
|'delimitMate_nesting_quotes'| Tells delimitMate which quotes should be
|'delimitMate_nesting_quotes'| Tells delimitMate which quotes should be
allowed to be nested.
|'delimitMate_visual_leader'| Sets the leader to be used in visual mode.
|'delimitMate_visual_leader'| Sets the leader to be used in visual mode.
|'delimitMate_expand_cr'| Turns on/off the expansion of <CR>.
|'delimitMate_expand_cr'| Turns on/off the expansion of <CR>.
|'delimitMate_expand_space'| Turns on/off the expansion of <Space>.
|'delimitMate_expand_space'| Turns on/off the expansion of <Space>.
|'delimitMate_smart_quotes'| Turns on/off the "smart quotes" feature.
|'delimitMate_excluded_ft'| Turns off the script for the given file types.
|'delimitMate_balance_matchpairs'|Turns on/off the "balance matching pairs"
feature.
|'delimitMate_excluded_regions'|Turns off the script for the given regions or
|'delimitMate_excluded_regions'| Turns off the script for the given regions or
syntax group names.
|'delimitMate_apostrophes'| Tells delimitMate how it should "fix"
|'delimitMate_excluded_ft'| Turns off the script for the given file types.
|'delimitMate_apostrophes'| Tells delimitMate how it should "fix"
balancing of single quotes when used as
apostrophes. NOTE: Not needed any more, kept
for compatibility with older versions.
|'delimitMate_smart_quotes'| Turns on/off the "smart quotes" feature.
------------------------------------------------------------------------------
3.2 OPTIONS DETAILS *delimitMateOptionDetails*
@@ -326,8 +344,8 @@ Default: [] ~
Quotes listed here will not be able to jump out of the empty pair, thus
allowing the autoclosed quotes to be nested.
e.g.: >
let delimitMate_quotes = ['"','`']
au FileType python let b:delimitMate_quotes = ['"']
let delimitMate_nesting_quotes = ['"','`']
au FileType python let b:delimitMate_nesting_quotes = ['"']
<
------------------------------------------------------------------------------
*'delimitMate_visual_leader'*
@@ -366,14 +384,28 @@ e.g.: >
au FileType tcl let b:delimitMate_expand_space = 1
<
------------------------------------------------------------------------------
*'delimitMate_excluded_ft'*
Values: A string of file type names separated by single commas. ~
Default: Empty. ~
*'delimitMate_smart_quotes'*
*'b:delimitMate_smart_quotes'*
Values: 1 or 0 ~
Default: 1 ~
This options turns delimitMate off for the listed file types, use this option
only if you don't want any of the features it provides on those file types.
This option turns on/off the smart quotes feature. Read
|delimitMateSmartQuotes| for details.
e.g.: >
let delimitMate_excluded_ft = "mail,txt"
let delimitMate_smart_quotes = 0
au FileType tcl let b:delimitMate_smart_quotes = 0
<
------------------------------------------------------------------------------
*'delimitMate_balance_matchpairs'*
*'b:delimitMate_balance_matchpairs'*
Values: 1 or 0 ~
Default: 0 ~
This option turns on/off the balancing of matching pairs. Read
|delimitMateBalance| for details.
e.g.: >
let delimitMate_balance_matchpairs = 1
au FileType tcl let b:delimitMate_balance_matchpairs = 1
<
------------------------------------------------------------------------------
*'delimitMate_excluded_regions'*
@@ -385,6 +417,16 @@ for more info about what is a region.
e.g.: >
let delimitMate_excluded_regions = "Comments,String"
<
------------------------------------------------------------------------------
*'delimitMate_excluded_ft'*
Values: A string of file type names separated by single commas. ~
Default: Empty. ~
This options turns delimitMate off for the listed file types, use this option
only if you don't want any of the features it provides on those file types.
e.g.: >
let delimitMate_excluded_ft = "mail,txt"
<
------------------------------------------------------------------------------
*'delimitMate_apostrophes'*
Values: Strings separated by ":". ~
@@ -589,8 +631,13 @@ This script was inspired by the auto-completion of delimiters on TextMate.
Version Date Release notes ~
|---------|------------|-----------------------------------------------------|
2.4 2010-07-29 * Current release:
- Unbalanced parens: see :help delimitMateBalance.
2.4.1 2010-07-31 * Current release:
- Fix problem with <Home> and <End>.
- Add missing doc on |'delimitMate_smart_quotes'|,
|delimitMateBalance| and
|'delimitMate_balance_matchpairs'|.
|---------|------------|-----------------------------------------------------|
2.4 2010-07-29 * - Unbalanced parens: see :help delimitMateBalance.
- Visual wrapping now works on block-wise visual
with some limitations.
- Arrow keys didn't work on terminal.

View File

@@ -1,7 +1,7 @@
" ============================================================================
" File: plugin/delimitMate.vim
" Version: 2.4
" Modified: 2010-07-29
" Version: 2.4.1
" Modified: 2010-07-31
" Description: This plugin provides auto-completion for quotes, parens, etc.
" Maintainer: Israel Chauca F. <israelchauca@gmail.com>
" Manual: Read ":help delimitMate".
@@ -27,7 +27,7 @@ if v:version < 700
endif
let s:loaded_delimitMate = 1
let delimitMate_version = "2.4"
let delimitMate_version = "2.4.1"
"}}}
" Functions: {{{