Minor changes.

This commit is contained in:
Israel Chauca Fuentes
2010-06-06 00:01:23 -05:00
parent 592cf2fea1
commit 6f22aab0b8
3 changed files with 23 additions and 15 deletions

View File

@@ -8,6 +8,7 @@
" Utilities {{{
function! delimitMate#Init() "{{{
" Initialize variables:
" delimitMate_autoclose {{{
if !exists("b:delimitMate_autoclose") && !exists("g:delimitMate_autoclose")
@@ -125,11 +126,10 @@ function! delimitMate#Init() "{{{
endfunction "}}} Init()
function! delimitMate#ShouldJump() "{{{
" Returns 1 if the next character is a closing delimiter.
let col = col('.')
let lcol = col('$')
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
if char == cdel
@@ -138,6 +138,7 @@ function! delimitMate#ShouldJump() "{{{
endif
endfor
let nchar = getline('.')[col]
if b:delimitMate_expand_space && char == " "
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
if nchar == cdel
@@ -147,6 +148,7 @@ function! delimitMate#ShouldJump() "{{{
endfor
endif
let uchar = getline(line('.') + 1)[0]
if b:delimitMate_expand_cr && char == ""
for cdel in b:delimitMate_right_delims + b:delimitMate_quotes_list
if uchar == cdel
@@ -488,6 +490,8 @@ function! delimitMate#ExpandSpace() "{{{
return "\<Space>"
endif
if delimitMate#WithinEmptyPair()
" Expand:
call insert(b:delimitMate_buffer, 's')
" Expand:
call insert(b:delimitMate_buffer, 's')
return delimitMate#WriteAfter(' ') . "\<Space>"
@@ -708,8 +712,6 @@ function! delimitMate#TestMappings() "{{{
for i in range(len(b:delimitMate_quotes_list))
exec "normal GGAOpen & close: " . b:delimitMate_quotes_list[i] . "|"
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>Space: " . b:delimitMate_quotes_list[i] . " |"
exec "normal A\<CR>Delete space: " . b:delimitMate_quotes_list[i] . " \<BS>|"