#Shift-Tab does not work in neovim running in Warp

4 messages · Page 1 of 1 (latest)

chilly token
#

<S-TAB> is incorrectly interpreted as <C-y> which prevents me from going back through the completions menu or navigating backwards through tabs. This issue only occurs with Warp and works properly in Mac's terminal, WezTerm, and Alacrotty.

gusty martenBOT
#

Hi @chilly token. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Yes, you're correct. There have been multiple reports of the Shift + Tab key combination not working as expected in neovim when using Warp. Instead of performing its expected function, it seems to be sending the Control + Y command. This issue has been reported in several GitHub issues, such as issue #1382 (https://github.com/warpdotdev/Warp/issues/1382), issue #2357 (https://github.com/warpdotdev/Warp/issues/2357), and issue #903 (https://github.com/warpdotdev/Warp/issues/903).

One user shared a workaround for this issue in issue #2357 (https://github.com/warpdotdev/Warp/issues/2357). They mapped Control + Y to the desired function in neovim as a temporary solution. Here's the code they used:

function map(mode, shortcut, command) 	
    vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true }) 
end

function nmap(shortcut, command) 	
    map('n', shortcut, command) 
end

nmap("<tab>", "<Cmd>BufferLineCycleNext<CR>")
nmap("<s-tab>", "<Cmd>BufferLineCyclePrev<CR>")
nmap("<c-Y>", "<Cmd>BufferLineCyclePrev<CR>")

This code sets Control + Y to perform the same function as Shift + Tab in their neovim configuration.

However, please note that this is a workaround and not a permanent solution. The Warp team is aware of this issue and is likely working on a fix.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@chilly token kapa.ai is still learning and improving, please let us know how it did by reacting below