sjbach / lusty

LustyExplorer / LustyJuggler for Vim
http://www.vim.org/scripts/script.php?script_id=1890
257 stars 30 forks source link

Conflict with Supertab - Lusty Juggler breaks the <Tab> mapping #31

Closed rlaffers closed 13 years ago

rlaffers commented 13 years ago

After triggering Lusty Juggler, Supertab stops working - pressing Tab inserts "<Plug>SuperTabForward". I suspect this is blameable on the known Vim bug of maparg() not returning flags.

:imap <Tab>
BEFORE triggering LustyJuggler returns:
i <Tab> <Plug>SuperTabForward
but AFTER triggering LustyJuggler it returns:
i <Tab> * <Plug>SuperTabForward
My workaround:
--- plugin/lusty-juggler.vim    2011-04-08 00:23:59.000000000 +0200
+++ plugin/lusty-juggler.vim    2011-04-17 14:29:04.000000000 +0200
@@ -557,7 +557,9 @@
       end
       # Can't use '<CR>' as an argument to :call func for some reason.
       map_key("<CR>", ":call <SID>LustyJugglerKeyPressed('ENTER')<CR>")
-      map_key("<Tab>", ":call <SID>LustyJugglerKeyPressed('TAB')<CR>")
+      
+      # From Richard Laffers: I commented this out to prevent breaking of Supertab
+      #map_key("<Tab>", ":call <SID>LustyJugglerKeyPressed('TAB')<CR>")

       # Cancel keys.
       map_key("i", ":call <SID>LustyJugglerCancel()<CR>")
@@ -599,7 +601,9 @@
         unmap_key(c)
       end
       unmap_key("<CR>")
-      unmap_key("<Tab>")
+
+      # From Richard Laffers: I commented this out to prevent breaking of Supertab
+      #unmap_key("<Tab>")

       unmap_key("i")
       unmap_key("q")

Btw, thanks for this plugin, it's gold.
sjbach commented 13 years ago

This should be fixed now thanks to https://github.com/sjbach/lusty/pull/32. You'll need to be running a recent version of Vim 7.3+ -- anything >= patchlevel 32.