Quickly jumping between buffers in Spacemacs


If you're using Spacemacs and want it to behave like other applications in which you can jump around tabs by pressing ⌘-<tab number> (or C-<tab-number>) you can add the following to your .spacemacs under dotspacemacs/config:

(defun dotspacemacs/config ()
  ;; ...
  (global-set-key (kbd "s-1") 'select-window-1)
  (global-set-key (kbd "s-2") 'select-window-2)
  (global-set-key (kbd "s-3") 'select-window-3)
  (global-set-key (kbd "s-4") 'select-window-4)
  (global-set-key (kbd "s-5") 'select-window-5)
  (global-set-key (kbd "s-6") 'select-window-6)
  (global-set-key (kbd "s-7") 'select-window-7)
  (global-set-key (kbd "s-8") 'select-window-8)
  (global-set-key (kbd "s-9") 'select-window-9)
  ;; ...
)

If you're not on OSX I guess the equivalent would be (kbd "C-X") to use Control instead of ⌘.

It seems like a silly thing, but if you use Emacs all day long it goes a long way as I find it a little faster and more intuitive than the default SPC-<buffer-number> (which only works in normal mode).