1

In vim and evil mode, normal-state C-w prefixes various window-related commands. For example, C-w l moves focus to the right, and C-w L moves the currently focused window to the right.

I would like access these commands in buffers that do not play well with evil mode (such as PDF buffers). Is it possible to make C-c w act globally as C-w does in evil normal state? It should be possible to use prefixes and counts.

1 Answer 1

1

All you need to do is assign your keybinding of choice to evil-window-map, whose docstring is:

Prefix command (definition is a keymap associating keystrokes with commands).

In your case, the following should work:

(global-set-key (kbd "\C-c w") #'evil-window-map)
0

Your Answer

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

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