Easy window navigation in emacs
- Clone this repo somewhere
- Add the following to your
~/.emacs:
(add-to-list 'load-path "/path/to/cloned/repo")
(requre 'ftw)- If you want it to be on always, add the following as well:
(ftw-mode 1)I use evil mode ("boo", I know), so the default prefix binding for ftw is "C-a", since I don't need to use it to get to the beginning of the line. If you do however want to set the leader to something else, There is a function ftw-set-leader-key to do this. Let's say you want to to set the leader key to "C-;", you would add the following to your ~/.emacs after loading the package:
(ftw-set-leader-key "C-;")As I said above the leader key is "C-a" by default and can be changed. I will use "C-a" below for the sake of simplicity.
C-a Vsplits the current window verticallyC-a Hsplits the current window horizontallyC-a hmoves to the window left of the current window. If there is no window to the left, this does nothing.C-a lmoves to the window right of the current window. If there is no window to the right, this does nothing.C-a jmoves to the window below the current window. If there is no window below, this does nothing.C-a kmoves to the window above the current window. If there is no window above, this does nothing.