0

I want to reclaim CTRL-W for closing my terminal tab to get the same behaviour as in Firefox and other programs. Is there a command I can run to avoid having to press CTRL-W to navigate windows in vim or neovim ?

0

1 Answer 1

1

In :h windows.txt you can find the following :

Note: All CTRL-W commands can also be executed with :wincmd, for those          
places where a Normal mode command can't be used or is inconvenient. 

and

                                                :winc :wincmd                   
These commands can also be executed with ":wincmd":                             
                                                                                
:[count]winc[md] {arg}                                                          
                Like executing CTRL-W [count] {arg}.  Example:                  
                        :wincmd j                                               
                Moves to the window below the current one.                      
                This command is useful when a Normal mode cannot be used (for   
                the CursorHold autocommand event).  Or when a Normal mode       
                command is inconvenient.                                        
                The count can also be a window number.  Example:                
                        :exe nr . "wincmd w"                                    
                This goes to window "nr".             
1
  • Note that you can accept your own answer to mark this as resolved.
    – D. Ben Knoble
    Sep 22, 2021 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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