I tried both noremap <C-/> and `noremap <C-_>' to map ctrl slash but neither worked. Press Ctrl+V followed by Ctrl+/ in insert mode does nothing.
Map ctrl slash
v8.2.4501 64 bit windows installer from https://github.com/vim/vim-win32-installer/releases
Windows
No response
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Press Ctrl+V followed by Ctrl+/ in insert mode does nothing.
cat(1) command then press Ctrl+/.vim -Nu NONE)?—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Which terminal are you using?
Ah my bad, your issue is in the GUI.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
FWIW, on Ubuntu, I can map <C-/> like this:
nnoremap <C-S-/> <Cmd>echomsg "Ctrl-/ was hit"<CR>
Test:
$ vim -Nu NONE -g +'nnoremap <C-S-/> <Cmd>echomsg "Ctrl-/ was hit"<CR>'
Note that I need to specify the shift modifier in the lhs of the mapping because I need to press it to produce a slash with my keyboard layout. But your keyboard layout might be different and not require shift.
Did it work in the past, and broke at some point? If so bisecting the regression might help.
Also, make sure to do a test without any config. If you can still reproduce, and nothing is inserted when you press Ctrl-V followed by Ctrl-/, then it might be that the keypress is intercepted before reaching Vim, by some other program (window manager, OS, ...).
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Did it work in the past, and broke at some point? If so bisecting the regression might help.
If it's a regression, it might have been caused by the patch 8.2.4502.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
If it's a regression, it might have been caused by the patch 8.2.4502.
Never mind, that patch can't be the issue, because your Vim version is 8.2.4501.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thank you for the prompt reply. I launched gVIM using `gvim --clean' and still didn't see anything after pressing Ctrl+V followed by Ctrl+/. I presume my keyboard is working fine since Ctrl+/ works in Visual Studio, I could be wrong though.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
This must be a Windows specific issue, on Linux it works fine. Without mapping CTRL-/ inserts a slash.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
still didn't see anything after pressing Ctrl+V followed by Ctrl+/
If Vim doesn't receive any keycode, then it can't do anything. The only explanation I can see is that something else intercepts the keypress.
Can you reproduce the issue in a terminal?
If so, try to get a log file:
$ vim --clean -g +'call ch_logfile("/tmp/logfile", "w")'
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
I can map Ctrl+/ using vim launched through cmd.exe. I think it's a gVIM specific issue.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
I cannot use ctrl+/ in either cmd vim nor in gvim. Could that be a windows specific issue? perhaps you need to configure windows keyboard language?
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
also please see the following: https://vimhelp.org/vim_faq.txt.html#faq-20.5
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
As far as I looked this, is not possible to handle with WM_CHAR or WM_SYSCHAR. Only WM_KEYUP can handle this.
diff --git a/src/gui_w32.c b/src/gui_w32.c index 584e4ef3e..d088cf7a9 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -4635,6 +4635,18 @@ _WndProc( } break; + case WM_KEYUP: + // handle CTRL-/ + if ((GetKeyState(VK_CONTROL) & 0x8000) != 0 && (wParam == 0xBF)) { + char_u string[4]; + string[0] = CSI; + string[1] = KS_MODIFIER; + string[2] = 4; + string[3] = 0x2F; + add_to_input_buf(string, 4); + } + return 0L; + case WM_CHAR: // Don't use HANDLE_MSG() for WM_CHAR, it truncates wParam to a single // byte while we want the UTF-16 character value.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
At the least, <c-_> insert some thing characters (^_), it is different issue from <c-/>.
Issue of <c-/> fixes with #10141
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
fixed by e08fde0
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #9895 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thank you @mattn and @chrisbra for fixing it, I confirm it works. You guys are real champs.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
With current version 9.1.0781, seems brocken again
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks. I've find this.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()