forked from msanders/snipmate.vim
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed annoying default mappings that clash with select mode
- Loading branch information
Michael Sanders
committed
Jul 12, 2009
1 parent
a69fccc
commit 938bbed
Showing
1 changed file
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
" These are the mappings for snipMate.vim. Putting it here ensures that it | ||
" will be mapped after other plugins such as supertab.vim. | ||
if exists('s:did_snips_mappings') || &cp || version < 700 | ||
if !exists('loaded_snips') || exists('s:did_snips_mappings') | ||
finish | ||
endif | ||
let s:did_snips_mappings = 1 | ||
|
||
ino <silent> <tab> <c-r>=TriggerSnippet()<cr> | ||
snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr> | ||
ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr> | ||
" The default mappings for these are annoying & sometimes break snipMate. | ||
" You can change them back if you want, I've put them here for convenience. | ||
snor <bs> b<bs> | ||
snor ' b<bs>' | ||
snor <right> <esc>a | ||
snor <left> <esc>bi | ||
snor ' b<bs>' | ||
snor ` b<bs>` | ||
snor % b<bs>% | ||
snor U b<bs>U | ||
snor ^ b<bs>^ | ||
snor \ b<bs>\ | ||
snor <c-x> b<bs><c-x> | ||
" By default load snippets in snippets_dir | ||
if empty(snippets_dir) | ||
finish | ||
endif | ||
|
||
call GetSnippets(snippets_dir, '_') " Get global snippets | ||
call GetSnippets(snippets_dir, '_') " Get global snippets | ||
|
||
au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif | ||
" vim:noet:sw=4:ts=4:ft=vim |