Add ivy option to buffer transient state

This commit is contained in:
yuhan0 2018-10-27 20:22:32 +08:00 committed by Codruț Constantin Gușoi
parent f63009ae20
commit 6737c8c8e5
3 changed files with 18 additions and 8 deletions

View File

@ -773,6 +773,7 @@ Benner and Paweł Siudak):
- Better delete file messages (thanks to duianto) - Better delete file messages (thanks to duianto)
- Replace centered-buffer-mode with writeroom-mode (thanks to Eugene - Replace centered-buffer-mode with writeroom-mode (thanks to Eugene
Yaremenko) Yaremenko)
- Add ivy option to buffer transient state (thanks to yuhan0)
- Enable =evil-search= search module in evil state. - Enable =evil-search= search module in evil state.
- Improve function =spacemacs/sort-lines-by-column= to work on rectangular/block - Improve function =spacemacs/sort-lines-by-column= to work on rectangular/block
selection and warn the user about its requirements (thanks to duianto) selection and warn the user about its requirements (thanks to duianto)

View File

@ -2337,13 +2337,19 @@ Buffer manipulation commands (start with ~b~):
A convenient buffer manipulation transient state allows to quickly cycles through A convenient buffer manipulation transient state allows to quickly cycles through
the opened buffer and kill them. the opened buffer and kill them.
| Key binding | Description | | Key binding | Description |
|-------------+-----------------------------------------------------------------------------------| |------------------------+--------------------------------------------------------------------------------------------|
| ~SPC b .~ | initiate transient state | | ~SPC b .~ | initiate transient state |
| ~K~ | kill current buffer | | ~[1..9]~ | move current buffer to nth window |
| ~n~ | go to next buffer (avoid buffers matching =spacemacs-useless-buffers-regexp=) | | ~[C-1..C-9]~ | switch focus to nth window |
| ~N~ | go to previous buffer (avoid buffers matching =spacemacs-useless-buffers-regexp=) | | ~[M-1..M-9]~ | swap current buffer with nth window |
| ~z~ | recenter buffer in window | | ~b~ | list all buffers with helm/ivy (avoid buffers matching =spacemacs-useless-buffers-regexp=) |
| ~d~ | kill current buffer |
| ~C-d~ | bury current buffer |
| ~n~ or ~<right>~ | go to next buffer (avoid buffers matching =spacemacs-useless-buffers-regexp=) |
| ~N~ or ~p~ or ~<left>~ | go to previous buffer (avoid buffers matching =spacemacs-useless-buffers-regexp=) |
| ~o~ | switch focus to other window |
| ~z~ | recenter buffer in window |
Unlike vim, emacs creates many buffers that most people do not need to see. Some Unlike vim, emacs creates many buffers that most people do not need to see. Some
examples are the =*Messages*= and =*Compile-Log*= buffers. Spacemacs tries to examples are the =*Messages*= and =*Compile-Log*= buffers. Spacemacs tries to

View File

@ -565,7 +565,10 @@ respond to this toggle."
("N" previous-buffer) ("N" previous-buffer)
("o" other-window) ("o" other-window)
("<left>" previous-buffer) ("<left>" previous-buffer)
("b" helm-buffers-list) ("b" (cond ((configuration-layer/layer-used-p 'helm)
(helm-buffers-list))
((configuration-layer/layer-used-p 'ivy)
(ivy-switch-buffer))))
("d" spacemacs/kill-this-buffer) ("d" spacemacs/kill-this-buffer)
("C-d" bury-buffer) ("C-d" bury-buffer)
("z" recenter-top-bottom) ("z" recenter-top-bottom)