Problem with keyboard mapping

41 views
Skip to first unread message

Ven Tadipatri

unread,
Jan 2, 2025, 12:47:15 PMJan 2
to vim...@googlegroups.com
Hi,
  I have the Vim Sql Workbench plugin, and I'm trying to get the keyboard shortcut working. When I type ":nmap", I see that this mapping is there:
n  \<C-Space>   @:SWSqlExecuteCurrent<CR>

However, when I type "backslash - ctrl - space" , the Terminal just flashes and does nothing. I've tried using a different leader key, and the same thing happens, so it doesn't seem to be a Mac Terminal setting. 
  This is on a mac, with vim 9.1 . On my old mac, this keymapping was working. It still works if I type ":SWSqlExecuteCurrent", it's just the keyboard shortcut that I'm struggling with.
  Would appreciate any help!

Thanks,
Ven

Igbanam Ogbuluijah

unread,
Jan 2, 2025, 4:25:07 PMJan 2
to vim...@googlegroups.com
Could you try this mapping

nnoremap <leader><space> :SWSqlExecuteCurrent<CR>

I don't know how the leader key would work with <C-space> (which I read as <ctrl><space>). 


Igbanam


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CAEodY67Vww8pR%2B6K24T33YcKgsBXw97byZPYWa9YXrb4Z-3jVg%40mail.gmail.com.

Ven Tadipatri

unread,
Jan 3, 2025, 8:55:38 AMJan 3
to vim...@googlegroups.com
Yes, the nnoremap worked perfectly! It looks to be an issue with Ctrl+space for some reason.
Thank you so much Igbanam for your help - I was struggling with this for several months and was ready to give up on getting the vim mapping right.

Thanks,
Ven

Ven Tadipatri

unread,
Feb 3, 2025, 9:15:05 AMFeb 3
to vim...@googlegroups.com
If you're on a Mac, the keyboard shortcuts may override the vim mappings you have. In this case, it turns out that this post helped : https://apple.stackexchange.com/a/423974 
There was a keyboard shortcut for switching input sources and once that was disabled, then the vim mapping worked as expected.

Thanks,
Ven
Reply all
Reply to author
Forward
0 new messages