abo-abo / ace-window

Quickly switch windows in Emacs
992 stars 87 forks source link

Is it possible to split when show only one window? #97

Closed alexei-28 closed 6 years ago

alexei-28 commented 7 years ago

When open at least 3 windows I easy can split (vertically or horizontally) selected windows. OK. But is it possible to split when show only ONE window?

abo-abo commented 7 years ago

I use plain C-x 2 and C-x 3.

See also aw-dispatch-always.

alexei-28 commented 7 years ago

Thanks. Here my bindings. It's very comfortably:

;; Split windows
(global-unset-key (kbd "C-x 3")) ;; split-window-right
(global-set-key (kbd "M-4") 'split-window-vertically)

(global-unset-key (kbd "C-x 2")) ;; split-window-below
(global-set-key (kbd "M-$") 'split-window-horizontally)
nickdrozd commented 7 years ago

If you have just one window, then if aw-dispatch-always is set to true, the ace-window split commands will automatically split that one window. You can change the keys in aw-dispatch-alist to essentially replace the default window commands with ace-window commands:

  (setq aw-dispatch-always t)
  (setq aw-dispatch-alist
    '((?0 aw-delete-window " Ace - Delete Window")
      (?m aw-swap-window " Ace - Swap Window")
      (?n aw-flip-window)
      (?2 aw-split-window-vert " Ace - Split Vert Window")
      (?3 aw-split-window-horz " Ace - Split Horz Window")
      (?1 delete-other-windows " Ace - Maximize Window")))
rswgnu commented 6 years ago

Looks like you can close this issue too.

abo-abo commented 6 years ago

Looks to be solved, closing.