emacs list-buffers behavior

前端 未结 9 1249
情话喂你
情话喂你 2021-02-01 12:39

In GNU emacs, every time I hit Ctrl-x Ctrl-b to see all of my buffers, the window is split to show the buffer list, or if I have my window already split in 2 (for ins

相关标签:
9条回答
  • 2021-02-01 13:18

    You might want to rebind C-x C-b to invoke buffer-menu rather than list-buffers:

    (global-set-key "\C-x\C-b" 'buffer-menu)
    
    0 讨论(0)
  • 2021-02-01 13:19

    not exactly a solution, but ido-mode provides a different and powerful way to interact with buffers. C-x b will then show a list of all the open buffers, and the one you select will open in the current window.

    0 讨论(0)
  • 2021-02-01 13:20

    Not sure where I got this but:

    ;;; Faster buffer switching
    (global-set-key [(C tab)] 'buffer-menu) 
    

    This makes Ctrl-Tab display all buffers in the current window. You can then navigate to a buffer and hit Enter to visit it.

    0 讨论(0)
  • 2021-02-01 13:22

    Another not-what-you-asked-for solution: don't select the desired buffer with the mouse, rather finish typing its name (use tab-completion to reduce keystrokes and increase accuracy), then hit return. The buffer list will disappear, and the new file will be open in the previously active window.

    0 讨论(0)
  • 2021-02-01 13:24

    Just customize the variable same-window-regexps. display-buffer will display any buffer whose name matches a regexp there in the currently-selected window.

    (You will want to add "[*]Buffer List".)

    0 讨论(0)
  • 2021-02-01 13:24

    I highly recommend bs.el from http://www.geekware.de/software/emacs/ Install it and:

    (require 'bs)
    (add-hook 'bs-mode-hook 'turn-on-font-lock)
    (global-set-key "\C-x\C-b" 'bs-show)
    

    It manages buffers and window configuration in the right way, so everything requires minimum number of keystrokes.

    0 讨论(0)
提交回复
热议问题