2

On Windows OS, I am using Chrome web browser to ssh into a remote Linux terminal and using vi there. One can use Ctrl-w + hjkl to navigate among split vi windows. However, the problem is Ctrl-w instantly closes Chrome tab (Windows OS) before I can do anything with vi. How can I navigate between vi windows when I cannot use Ctrl-w?

3
  • 2
    Welcome to Vi and Vim! See this question for a possible solution in Chrome itself, disabling the Ctrl+W behavior in Chrome, which should make it available in your SSH sessions.
    – filbranden
    Jan 14, 2021 at 18:43
  • 1
    I tried binding Ctrl+w to another extension, however the shortcut activates that extension instead of sending to remote terminal.
    – ewr3243
    Jan 14, 2021 at 19:53
  • Map something else to Ctrl-w? Say, nnoremap <leader>w <c-w>? Or use :wincmd?
    – muru
    Jan 14, 2021 at 21:56

1 Answer 1

1

Thanks to comment of muru.

Solved the problem using https://vi.stackexchange.com/a/3729/33095

:nnoremap <Leader>w <C-w>

Unless you've remapped , you can now use \w (after each other). I actually prefer this since I don't like CTRL+key combinations.

and/or using https://vi.stackexchange.com/a/3737/33095.

I actually use :wincmd more often than Ctrl+W because I find it easier to type the abbreviated :winc.

Not the answer you're looking for? Browse other questions tagged or ask your own question.