commit
b8a1f3a70e
@ -46,6 +46,8 @@ call neosnippet#util#set_default(
|
|||||||
\ 'g:neosnippet#enable_complete_done')
|
\ 'g:neosnippet#enable_complete_done')
|
||||||
call neosnippet#util#set_default(
|
call neosnippet#util#set_default(
|
||||||
\ 'g:neosnippet#enable_auto_clear_markers', 1)
|
\ 'g:neosnippet#enable_auto_clear_markers', 1)
|
||||||
|
call neosnippet#util#set_default(
|
||||||
|
\ 'g:neosnippet#completed_pairs',{'_':{ '(' : ')', '{' : '}', '"' : '"' }})
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
function! neosnippet#expandable_or_jumpable() "{{{
|
function! neosnippet#expandable_or_jumpable() "{{{
|
||||||
|
@ -304,8 +304,11 @@ function! neosnippet#parser#_get_completed_snippet(completed_item, next_text) "{
|
|||||||
if item.info != ''
|
if item.info != ''
|
||||||
let abbr = split(item.info, '\n')[0]
|
let abbr = split(item.info, '\n')[0]
|
||||||
endif
|
endif
|
||||||
|
if index(keys(g:neosnippet#completed_pairs),expand(&ft)) < 0
|
||||||
let pairs = { '(' : ')', '{' : '}', '"' : '"' }
|
let pairs = g:neosnippet#completed_pairs._
|
||||||
|
else
|
||||||
|
let pairs = g:neosnippet#completed_pairs[expand(&ft)]
|
||||||
|
endif
|
||||||
let word_pattern = neosnippet#util#escape_pattern(item.word)
|
let word_pattern = neosnippet#util#escape_pattern(item.word)
|
||||||
let angle_pattern = word_pattern . '<.\+>(.*)'
|
let angle_pattern = word_pattern . '<.\+>(.*)'
|
||||||
let no_key = index(keys(pairs), item.word[-1:]) < 0
|
let no_key = index(keys(pairs), item.word[-1:]) < 0
|
||||||
|
Loading…
Reference in New Issue
Block a user