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