Created
March 5, 2011 16:06
-
-
Save tungd/856472 to your computer and use it in GitHub Desktop.
Fix tab completion with Neocomplecache and SnipMate
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
diff --git a/plugin/snipMate.vim b/plugin/snipMate.vim | |
index ef03b12..b1738c6 100644 | |
--- a/plugin/snipMate.vim | |
+++ b/plugin/snipMate.vim | |
@@ -159,8 +159,10 @@ fun! TriggerSnippet() | |
if exists('SuperTabKey') | |
call feedkeys(SuperTabKey) | return '' | |
endif | |
- call feedkeys("\<esc>a", 'n') " Close completion menu | |
- call feedkeys("\<tab>") | return '' | |
+ if !exists('g:neocomplcache_snipmate') | |
+ call feedkeys("\<esc>a", 'n') " Close completion menu | |
+ call feedkeys("\<tab>") | return '' | |
+ endif | |
endif | |
if exists('g:snipPos') | return snipMate#jumpTabStop(0) | endif | |
@@ -181,6 +183,11 @@ fun! TriggerSnippet() | |
call feedkeys(SuperTabKey) | |
return '' | |
endif | |
+ | |
+ if exists('g:neocomplcache_snipmate') && (word != '') | |
+ call feedkeys("\<c-n>") | |
+ return '' | |
+ endif | |
return "\<tab>" | |
endf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add one option
g:neocomplcache_snipmate
because plugin detection is not possible