Skip to content

Commit

Permalink
Make SPC TAB window-aware
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Aug 5, 2015
1 parent 2e8f62c commit 07aaad5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
44 changes: 22 additions & 22 deletions doc/DOCUMENTATION.org
Original file line number Diff line number Diff line change
Expand Up @@ -1330,28 +1330,28 @@ dotfile.
**** Buffers manipulation key bindings
Buffer manipulation commands (start with ~b~):

| Key Binding | Description |
|-------------+-------------------------------------------------------------------------|
| ~SPC TAB~ | switch to alternate buffer (switch back and forth) |
| ~SPC b b~ | switch to a buffer using =helm= |
| ~SPC b d~ | kill the current buffer (does not delete the visited file) |
| ~SPC b e~ | erase the content of the buffer (ask for confirmation) |
| ~SPC b h~ | open =*spacemacs*= home buffer |
| ~SPC b k~ | kill a buffer |
| ~SPC b K~ | kill all buffers except the current one |
| ~SPC b C-K~ | kill all buffers matching the regexp |
| ~SPC b m h~ | move a buffer to the left |
| ~SPC b m j~ | move a buffer to the bottom |
| ~SPC b m k~ | move a buffer to the top |
| ~SPC b m l~ | move a buffer to the right |
| ~SPC b M~ | swap windows using [[https://github.com/abo-abo/ace-window][ace-swap-window]] |
| ~SPC b n~ | switch to next buffer avoiding special buffers |
| ~SPC b p~ | switch to previous buffer avoiding special buffers |
| ~SPC b P~ | copy clipboard and replace buffer (useful when pasting from a browser) |
| ~SPC b R~ | revert the current buffer (reload from disk) |
| ~SPC b w~ | toggle read-only (writable state) |
| ~SPC b Y~ | copy whole buffer to clipboard (useful when copying to a browser) |
| ~z f~ | Make current function or comments visible in buffer as much as possible |
| Key Binding | Description |
|-------------+--------------------------------------------------------------------------|
| ~SPC TAB~ | switch to alternate buffer in the current window (switch back and forth) |
| ~SPC b b~ | switch to a buffer using =helm= |
| ~SPC b d~ | kill the current buffer (does not delete the visited file) |
| ~SPC b e~ | erase the content of the buffer (ask for confirmation) |
| ~SPC b h~ | open =*spacemacs*= home buffer |
| ~SPC b k~ | kill a buffer |
| ~SPC b K~ | kill all buffers except the current one |
| ~SPC b C-K~ | kill all buffers matching the regexp |
| ~SPC b m h~ | move a buffer to the left |
| ~SPC b m j~ | move a buffer to the bottom |
| ~SPC b m k~ | move a buffer to the top |
| ~SPC b m l~ | move a buffer to the right |
| ~SPC b M~ | swap windows using [[https://github.com/abo-abo/ace-window][ace-swap-window]] |
| ~SPC b n~ | switch to next buffer avoiding special buffers |
| ~SPC b p~ | switch to previous buffer avoiding special buffers |
| ~SPC b P~ | copy clipboard and replace buffer (useful when pasting from a browser) |
| ~SPC b R~ | revert the current buffer (reload from disk) |
| ~SPC b w~ | toggle read-only (writable state) |
| ~SPC b Y~ | copy whole buffer to clipboard (useful when copying to a browser) |
| ~z f~ | Make current function or comments visible in buffer as much as possible |

**** Buffers manipulation manipulation micro-state
A convenient buffer manipulation micro-state allows to quickly cycles through
Expand Down
7 changes: 5 additions & 2 deletions spacemacs/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,12 @@ The body of the advice is in BODY."
(ert t))

(defun spacemacs/alternate-buffer ()
"Switch back and forth between current and last buffer."
"Switch back and forth between current and last buffer in the
current window."
(interactive)
(switch-to-buffer (other-buffer (current-buffer) t)))
(if (evil-alternate-buffer)
(switch-to-buffer (car (evil-alternate-buffer)))
(switch-to-buffer (other-buffer (current-buffer) t))))

(defun spacemacs/highlight-TODO-words ()
"Highlight keywords for "
Expand Down

0 comments on commit 07aaad5

Please sign in to comment.