- Improved clear select mode mappings.
This commit is contained in:
parent
e1bb6d58ef
commit
d4870c9987
@ -94,11 +94,6 @@ function! s:initialize()"{{{
|
|||||||
|
|
||||||
hi def link neosnippetExpandSnippets Special
|
hi def link neosnippetExpandSnippets Special
|
||||||
|
|
||||||
" Select mode mappings."{{{
|
|
||||||
if g:neosnippet#disable_select_mode_mappings
|
|
||||||
autocmd neosnippet BufEnter * call s:clear_select_mode_mappings()
|
|
||||||
endif"}}}
|
|
||||||
|
|
||||||
" Caching _ snippets.
|
" Caching _ snippets.
|
||||||
call neosnippet#make_cache('_')
|
call neosnippet#make_cache('_')
|
||||||
|
|
||||||
@ -956,7 +951,11 @@ function! s:trigger(function)"{{{
|
|||||||
\ a:function, string(cur_text), col)
|
\ a:function, string(cur_text), col)
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
function! s:clear_select_mode_mappings()"{{{
|
function! neosnippet#clear_select_mode_mappings()"{{{
|
||||||
|
if !g:neosnippet#disable_select_mode_mappings
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
redir => mappings
|
redir => mappings
|
||||||
silent! smap
|
silent! smap
|
||||||
redir END
|
redir END
|
||||||
@ -970,6 +969,14 @@ function! s:clear_select_mode_mappings()"{{{
|
|||||||
silent! execute 'sunmap' map
|
silent! execute 'sunmap' map
|
||||||
silent! execute 'sunmap <buffer>' map
|
silent! execute 'sunmap <buffer>' map
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
" Define default select mode mappings.
|
||||||
|
snoremap <CR> a<BS>
|
||||||
|
snoremap <BS> a<BS>
|
||||||
|
snoremap <Del> a<BS>
|
||||||
|
snoremap <C-h> a<BS>
|
||||||
|
snoremap <right> <ESC>a
|
||||||
|
snoremap <left> <ESC>bi
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
" Plugin key-mappings.
|
" Plugin key-mappings.
|
||||||
|
@ -457,6 +457,7 @@ CHANGELOG *neosnippet-changelog*
|
|||||||
2012-10-29
|
2012-10-29
|
||||||
- Improved parse of snippets file.
|
- Improved parse of snippets file.
|
||||||
- Improved syntax of markers.
|
- Improved syntax of markers.
|
||||||
|
- Improved clear select mode mappings.
|
||||||
|
|
||||||
2012-10-28
|
2012-10-28
|
||||||
- Improved snipMate compatibility.
|
- Improved snipMate compatibility.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" FILE: neosnippet.vim
|
" FILE: neosnippet.vim
|
||||||
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
||||||
" Last Modified: 19 Oct 2012.
|
" Last Modified: 29 Oct 2012.
|
||||||
" License: MIT license {{{
|
" License: MIT license {{{
|
||||||
" Permission is hereby granted, free of charge, to any person obtaining
|
" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
" a copy of this software and associated documentation files (the
|
" a copy of this software and associated documentation files (the
|
||||||
@ -85,6 +85,8 @@ augroup neosnippet"{{{
|
|||||||
" Recaching events
|
" Recaching events
|
||||||
autocmd BufWritePost *.snip,*.snippets
|
autocmd BufWritePost *.snip,*.snippets
|
||||||
\ call neosnippet#recaching()
|
\ call neosnippet#recaching()
|
||||||
|
autocmd BufEnter *
|
||||||
|
\ call neosnippet#clear_select_mode_mappings()
|
||||||
augroup END"}}}
|
augroup END"}}}
|
||||||
|
|
||||||
" Commands."{{{
|
" Commands."{{{
|
||||||
|
Loading…
Reference in New Issue
Block a user