diff --git a/.gitignore b/.gitignore index 2fda4f2..5338046 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ *.gz vimball.txt *.orig +tags diff --git a/Makefile b/Makefile index 4d2f5fe..730c4ba 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,12 @@ 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) +#install: vimball + #@echo install + #$(VIM) -N -c ':so %' -c':q!' $(PLUGIN)-$(VERSION).vba + #cp -f $(TESTS) $(VIMFOLDER)$(TESTS) -all: uninstall vimball install README zip gzip +all: vimball README zip gzip vimball: $(PLUGIN).vba @@ -25,10 +25,10 @@ clean: dist-clean: clean -uninstall: - @echo uninstall - $(VIM) -N -c':RmVimball' -c':q!' $(PLUGIN)-$(VERSION).vba - rm -f $(VIMFOLDER)$(TESTS) +#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 @@ -47,8 +47,10 @@ zip: @echo zip rm -f *.zip zip -r $(PLUGIN).zip doc plugin autoload - zip $(PLUGIN).zip -d \*.sw\? - zip $(PLUGIN).zip -d \*.orig + zip $(PLUGIN).zip -d \*.sw\? || echo 1 + zip $(PLUGIN).zip -d \*.un\? || echo 1 + zip $(PLUGIN).zip -d \*.orig || echo 1 + zip $(PLUGIN).zip -d \*tags || echo 1 zip $(PLUGIN).zip -d $(TESTS) ln -f $(PLUGIN).zip $(PLUGIN)-$(VERSION).zip diff --git a/README b/README index 6d49386..f3ae229 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -*delimitMate* Trying to keep those beasts at bay! v2.4DEV *delimitMate.txt* +*delimitMate* Trying to keep those beasts at bay! v2.4 *delimitMate.txt* @@ -90,6 +90,9 @@ Without auto-close: > –––––––––-|–––––––––– () | ()| < +NOTE: Abbreviations will not be expanded by delimiters used on delimitMate, +you should use (read |i_CTRL-]|) to expand them on the go. + ------------------------------------------------------------------------------ 2.2 EXPANSION OF SPACE AND CAR RETURN *delimitMateExpansion* @@ -125,8 +128,9 @@ If you press backspace inside an empty pair, both delimiters are deleted. When expansions are enabled, will also delete the expansions. NOTE that deleting expansions will brake the redo command. -If you type shift + backspace instead, only the closing delimiter will be -deleted. +If you type (shift + backspace) instead, only the closing delimiter +will be deleted. NOTE that this will not usually work when using Vim from the +terminal, see 'delimitMate#JumpAny()' below to see how to fix it. e.g. typing at the "|": > @@ -163,9 +167,10 @@ e.g. (selection represented between square brackets): > ------------------------------------------------------------------------------ 2.5 SMART QUOTES *delimitMateSmartQuotes* -Only one quote will be inserted following a quote, a "\" or an alphanumeric -character. This should cover closing quotes, escaped quotes and apostrophes. -Except for apostrophes, this feature can be disabled setting the option +Only one quote will be inserted following a quote, a "\" or, following or +preceding an alphanumeric character. This should cover closing quotes after a +string, opening quotes before a string, escaped quotes and apostrophes. Except +for apostrophes, this feature can be disabled setting the option |'delimitMate_smart_quotes'| to 0. e.g. typing at the "|": > @@ -234,6 +239,10 @@ specific file types, see |delimitMateOptionDetails| for examples. |'delimitMate_quotes'| Tells delimitMate which quotes should be used. +|'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_expand_cr'| Turns on/off the expansion of . @@ -287,7 +296,7 @@ e.g.: > ------------------------------------------------------------------------------ *'delimitMate_matchpairs'* *'b:delimitMate_matchpairs'* -Values: A string with |matchpairs| syntax. ~ +Values: A string with |'matchpairs'| syntax. ~ Default: &matchpairs ~ Use this option to tell delimitMate which characters should be considered @@ -308,6 +317,18 @@ e.g.: > let delimitMate_quotes = "\" ' ` *" au FileType html let b:delimitMate_quotes = "\" '" < +------------------------------------------------------------------------------ + *'delimitMate_nesting_quotes'* + *'b:delimitMate_nesting_quotes'* +Values: A list of quotes. ~ +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 = ['"'] +< ------------------------------------------------------------------------------ *'delimitMate_visual_leader'* *'b:delimitMate_visual_leader'* @@ -472,9 +493,15 @@ Functions should be used enclosed between = and , otherwise they might not work as expected or at all. ------------------------------------------------------------------------------ -delimitMate#WithinEmptyPair() *delimitMate_WithinEmptyPair* +delimitMate#WithinEmptyPair() *delimitMate_WithinEmptyPair()* Returns 1 if the cursor is inside an empty pair, 0 otherwise. +e.g.: > + + inoremap delimitMate#WithinEmptyPair() ? + \ "\=delimitMate#ExpandReturn()\" : + \ "external_mapping" +< ------------------------------------------------------------------------------ delimitMate#ExpandReturn() *delimitMate#ExpandReturn()* @@ -485,7 +512,8 @@ Returns the expansion for if enabled and inside an empty pair, returns e.g.: This mapping could be used to select an item on a pop-up menu or expand inside an empty pair: > - inoremap pumvisible() ? "\" : + inoremap pumvisible() ? + \"\" : \ "\=delimitMate#ExpandReturn()\" < ------------------------------------------------------------------------------ @@ -510,7 +538,7 @@ This function returns a mapping that will make the cursor jump to the right when delimitMate#ShouldJump() returns 1, returns the argument "key" otherwise. e.g.: You can use this to create your own mapping to jump over any delimiter. > - inoremap =delimitMate#JumpAny("\") + inoremap =delimitMate#JumpAny("\") < ============================================================================== @@ -561,10 +589,14 @@ This script was inspired by the auto-completion of delimiters on TextMate. Version Date Release notes ~ |---------|------------|-----------------------------------------------------| - 2.4DEV 2010-06-06 * Current release: + 2.4 2010-07-29 * Current release: - Unbalanced parens: see :help delimitMateBalance. - Visual wrapping now works on block-wise visual with some limitations. + - Arrow keys didn't work on terminal. + - Added option to allow nested quotes. + - Expand Smart Quotes to look for a string on the + right of the cursor. |---------|------------|-----------------------------------------------------| 2.3.1 2010-06-06 * - Fix: an extra is inserted after diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index 6e24429..9f215fd 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -1,7 +1,7 @@ " ============================================================================ " File: autoload/delimitMate.vim -" Version: 2.4DEV -" Modified: 2010-06-06 +" Version: 2.4 +" Modified: 2010-07-29 " Description: This plugin provides auto-completion for quotes, parens, etc. " Maintainer: Israel Chauca F. " Manual: Read ":help delimitMate". diff --git a/doc/delimitMate.txt b/doc/delimitMate.txt index f3fedae..f3ae229 100644 --- a/doc/delimitMate.txt +++ b/doc/delimitMate.txt @@ -1,4 +1,4 @@ -*delimitMate* Trying to keep those beasts at bay! v2.4DEV *delimitMate.txt* +*delimitMate* Trying to keep those beasts at bay! v2.4 *delimitMate.txt* @@ -589,7 +589,7 @@ This script was inspired by the auto-completion of delimiters on TextMate. Version Date Release notes ~ |---------|------------|-----------------------------------------------------| - 2.4DEV 2010-06-06 * Current release: + 2.4 2010-07-29 * Current release: - Unbalanced parens: see :help delimitMateBalance. - Visual wrapping now works on block-wise visual with some limitations. diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index 163ee6d..8e2fefa 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -1,7 +1,7 @@ " ============================================================================ " File: plugin/delimitMate.vim -" Version: 2.4DEV -" Modified: 2010-06-06 +" Version: 2.4 +" Modified: 2010-07-29 " Description: This plugin provides auto-completion for quotes, parens, etc. " Maintainer: Israel Chauca F. " Manual: Read ":help delimitMate". @@ -27,7 +27,7 @@ if v:version < 700 endif let s:loaded_delimitMate = 1 -let delimitMate_version = "2.4DEV" +let delimitMate_version = "2.4" "}}} " Functions: {{{