Delete InsertLeave event

This commit is contained in:
Shougo Matsushita 2013-12-25 22:04:02 +09:00
parent 38a24ec1db
commit e5b90773b2
3 changed files with 4 additions and 23 deletions

View File

@ -1,7 +1,7 @@
"=============================================================================
" FILE: init.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 21 Nov 2013.
" Last Modified: 25 Dec 2013.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@ -84,7 +84,6 @@ function! s:initialize_others() "{{{
\ call neosnippet#variables#set_snippets({})
autocmd BufEnter *
\ call neosnippet#mappings#_clear_select_mode_mappings()
autocmd InsertLeave * call neosnippet#view#_on_insert_leave()
augroup END"}}}
augroup neosnippet

View File

@ -166,22 +166,6 @@ function! neosnippet#view#_jump(cur_text, col) "{{{
return s:search_outof_range(a:col)
endfunction"}}}
function! neosnippet#view#_on_insert_leave() "{{{
let expand_stack = neosnippet#variables#expand_stack()
" Get patterns and count.
if empty(expand_stack)
\ || neosnippet#variables#current_neosnippet().trigger
return
endif
if expand_stack[-1].begin_line != expand_stack[-1].end_line
return
endif
call neosnippet#commands#_clear_markers()
endfunction"}}}
function! s:indent_snippet(begin, end) "{{{
if a:begin > a:end
return

View File

@ -638,9 +638,6 @@ insert empty line in snippet end, you must insert placeholder.
<
Note: If you expand oneline snippet, the markers will be deleted in
|InsertLeave|.
==============================================================================
UNITE SOURCES *neosnippet-unite-sources*
@ -729,9 +726,10 @@ Q: I want to add snippets dynamically.
A: You can use |:NeoSnippetSource| for it.
Q: I want to delete markers in multiline snippet.
Q: I want to delete markers when InsertLeave event.
A: You can use |:NeoSnippetClearMarkers| command.
A: You can use |:NeoSnippetClearMarkers| command. >
autocmd InsertLeave * NeoSnippetClearMarkers
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: