Skip to content

Commit

Permalink
Expansion documentation and intialization fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raimondi committed Jun 13, 2010
1 parent e0de2db commit 740fc90
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
24 changes: 24 additions & 0 deletions autoload/delimitMate.vim
Expand Up @@ -59,9 +59,33 @@ function! delimitMate#Init() "{{{
\ exists('g:mapleader') ? g:mapleader : "\\")

" expand_space
if exists("b:delimitMate_expand_space") && type(b:delimitMate_expand_space) == type("")
echom "b:delimitMate_expand_space is '".b:delimitMate_expand_space."' but it must be either 1 or 0!"
echom "Read :help 'delimitMate_expand_space' for more details."
unlet b:delimitMate_expand_space
let b:delimitMate_expand_space = 1
endif
if exists("g:delimitMate_expand_space") && type(g:delimitMate_expand_space) == type("")
echom "g:delimitMate_expand_space is '".g:delimitMate_expand_space."' but it must be either 1 or 0!"
echom "Read :help 'delimitMate_expand_space' for more details."
unlet g:delimitMate_expand_space
let b:delimitMate_expand_space = 1
endif
call delimitMate#option_init("expand_space", 0)

" expand_cr
if exists("b:delimitMate_expand_cr") && type(b:delimitMate_expand_cr) == type("")
echom "b:delimitMate_expand_cr is '".b:delimitMate_expand_cr."' but it must be either 1 or 0!"
echom "Read :help 'delimitMate_expand_cr' for more details."
unlet b:delimitMate_expand_cr
let b:delimitMate_expand_cr = 1
endif
if exists("g:delimitMate_expand_cr") && type(g:delimitMate_expand_cr) == type("")
echom "g:delimitMate_expand_cr is '".g:delimitMate_expand_cr."' but it must be either 1 or 0!"
echom "Read :help 'delimitMate_expand_cr' for more details."
unlet g:delimitMate_expand_cr
let b:delimitMate_expand_cr = 1
endif
call delimitMate#option_init("expand_cr", 0)

" smart_quotes
Expand Down
14 changes: 7 additions & 7 deletions doc/delimitMate.txt
Expand Up @@ -305,7 +305,7 @@ Default: "\" ' `" ~
Use this option to tell delimitMate which characters should be considered as
quotes. Read |delimitMateAutoClose| for details.
e.g.: >
let b:delimitMate_quotes = "\" ' ` *"
let delimitMate_quotes = "\" ' ` *"
au FileType html let b:delimitMate_quotes = "\" '"
<
------------------------------------------------------------------------------
Expand All @@ -329,20 +329,20 @@ Default: 0 ~
This option turns on/off the expansion of <CR>. Read |delimitMateExpansion|
for details.
e.g.: >
let b:delimitMate_expand_cr = "\<CR>\<CR>\<Up>"
au FileType mail let b:delimitMate_expand_cr = "\<CR>"
let delimitMate_expand_cr = 1
au FileType mail let b:delimitMate_expand_cr = 1
<
------------------------------------------------------------------------------
*'delimitMate_expand_space'*
*'b:delimitMate_expand_space'*
Values: A key mapping. ~
Default: "\<Space>" ~
Values: 1 or 0 ~
Default: 0 ~

This option turns on/off the expansion of <Space>. Read |delimitMateExpansion|
for details.
e.g.: >
let delimitMate_expand_space = "\<Space>\<Space>\<Left>"
au FileType tcl let b:delimitMate_expand_space = "\<Space>"
let delimitMate_expand_space = 1
au FileType tcl let b:delimitMate_expand_space = 1
<
------------------------------------------------------------------------------
*'delimitMate_excluded_ft'*
Expand Down

0 comments on commit 740fc90

Please sign in to comment.