From 90077ef529b55b79a36092935f1a654d4b86730a Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Fri, 27 Mar 2009 13:46:03 -0400 Subject: [PATCH] fixed another aspect of supertab behavior (inserting an actual tab when cursor is on whitespace) --- plugin/snipMate.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/snipMate.vim b/plugin/snipMate.vim index 5df3e52..1c39e5a 100644 --- a/plugin/snipMate.vim +++ b/plugin/snipMate.vim @@ -1,6 +1,6 @@ " File: snipMate.vim " Author: Michael Sanders -" Version: 0.74 +" Version: 0.75 " Description: snipMate.vim implements some of TextMate's snippets features in " Vim. A snippet is a piece of often-typed text that you can " insert into your document using a trigger word followed by a "". @@ -150,7 +150,8 @@ fun! TriggerSnippet() sil exe 's/'.escape(trigger, '.^$/\*[]').'\%#//' return snipMate#expandSnip(col) endif - return exists('g:SuperTabKey') ? g:SuperTabKey : "\" + return exists('g:SuperTabKey') && getline('.')[col('.')-2] =~ '\S' + \ ? g:SuperTabKey : "\" endf " Check if word under cursor is snippet trigger; if it isn't, try checking if