mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Some little changes.
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
[_] 33% Automatic set-up by file type
|
||||
[X] 100% Customizable expansions
|
||||
[_] 0% Create list of settings per file type
|
||||
[_] 0% Use :normal instead for expansions?
|
||||
|
||||
[X] 100% Use escape()
|
||||
|
||||
[_] % Add command-line auto-pairing
|
||||
: Would this have to be constant? consider only vim language? I think so...
|
||||
|
||||
vim:tw:78
|
||||
@@ -54,21 +54,21 @@ Unless |delimitMate_matchpairs| is set, this script uses the values in
|
||||
The following table shows the behaviour, this applies to quotes too (the final
|
||||
position of the cursor is represented by a "|"):
|
||||
|
||||
With auto-close:
|
||||
With auto-close: >
|
||||
Type | You get
|
||||
====================
|
||||
( | (|)
|
||||
–––––––––|––––––––––
|
||||
() | ()|
|
||||
|
||||
Without auto-close:
|
||||
<
|
||||
Without auto-close: >
|
||||
|
||||
Type | You get
|
||||
====================
|
||||
() | (|)
|
||||
–––––––––|––––––––––
|
||||
()) | ()|
|
||||
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
2.2 EXPANSION OF SPACE AND CAR RETURN *delimitMateExpansion*
|
||||
|
||||
@@ -76,32 +76,32 @@ 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 "|"):
|
||||
|
||||
Expand <Space> to:
|
||||
Expand <Space> to: >
|
||||
|
||||
<Space><Space><Left> | You get
|
||||
====================================
|
||||
(|) | ( | )
|
||||
|
||||
Expand <CR> to:
|
||||
<
|
||||
Expand <CR> to: >
|
||||
|
||||
<CR><CR><Up> | You get
|
||||
============================
|
||||
(|) | (
|
||||
| |
|
||||
| )
|
||||
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.3 DELETION OF EMPTY PAIR *delimitMateBackspace*
|
||||
|
||||
If you press backspace inside an empty pair, both delimiters are deleted.
|
||||
|
||||
e.g.:
|
||||
e.g.: >
|
||||
|
||||
Before | After
|
||||
====================================
|
||||
call expand(|) | call expand|
|
||||
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.4 WRAPPING OF VISUAL SELECTION *delimitMateVisualWrapping*
|
||||
@@ -111,12 +111,12 @@ 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.
|
||||
|
||||
e.g. (selection represented between square brackets):
|
||||
e.g. (selection represented between square brackets): >
|
||||
|
||||
Selected text | After q"
|
||||
=============================================
|
||||
An [absurd] example! | An "absurd" example!
|
||||
|
||||
<
|
||||
==============================================================================
|
||||
3. CUSTOMIZATION *delimitMateOptions*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
" ===========================================================================
|
||||
" ============================================================================
|
||||
" File: delimitMate.vim
|
||||
" Description: This plugin tries to emulate the auto-completion of delimiters
|
||||
" that TextMate provides.
|
||||
@@ -22,6 +22,7 @@ if exists("g:loaded_delimitMate") "{{{1
|
||||
call s:DelimitMateDo()
|
||||
finish
|
||||
endif
|
||||
|
||||
if v:version < 700
|
||||
echoerr "delimitMate: this plugin requires vim >= 7!"
|
||||
finish
|
||||
@@ -41,7 +42,7 @@ function! s:Init() "{{{1
|
||||
if s:ValidMatchpairs(&matchpairs) == 1
|
||||
let s:matchpairs_temp = &matchpairs
|
||||
else
|
||||
echoerr "There seems to be a problem with 'matchpairs', read ':help matchpairs' and fix it or notify the maintainer of this script if it's a bug."
|
||||
echoerr "There seems to be a problem with 'matchpairs', read ':help matchpairs' and fix it or notify the maintainer of this script if this is a bug."
|
||||
finish
|
||||
endif
|
||||
else
|
||||
@@ -53,7 +54,7 @@ function! s:Init() "{{{1
|
||||
if s:ValidMatchpairs(&matchpairs) == 1
|
||||
let s:matchpairs_temp = &matchpairs
|
||||
else
|
||||
echoerr "There seems tobe a problem with 'matchpairs', read ':help matchpairs' and fix it or notify the maintainer of this script if it's a bug."
|
||||
echoerr "There seems to be a problem with 'matchpairs', read ':help matchpairs' and fix it or notify the maintainer of this script if this is a bug."
|
||||
let s:matchpairs_temp = ""
|
||||
endif
|
||||
|
||||
@@ -96,7 +97,7 @@ function! s:Init() "{{{1
|
||||
let s:matchpairs = split(s:matchpairs_temp, ',')
|
||||
let s:left_delims = split(s:matchpairs_temp, ':.,\=')
|
||||
let s:right_delims = split(s:matchpairs_temp, ',\=.:')
|
||||
let s:VMapMsg = "delimitMate is disabled on blockwise visual mode."
|
||||
let s:VMapMsg = "delimitMate: delimitMate is disabled on blockwise visual mode."
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
1
install.txt
Normal file
1
install.txt
Normal file
@@ -0,0 +1 @@
|
||||
To install this script just copy delimitMate.vim to your Vim's plugin folder (e.g.: $HOME/.vim/plugin) and delimitMate.txt to the respective 'doc' folder, then run 'helptags /path/to/.vim/doc'. After that you can read ':help delimitMate' for more info.
|
||||
Reference in New Issue
Block a user