Emacs navigation between files with same names

后端 未结 3 1597
刺人心
刺人心 2021-01-19 02:41

I\'ve long been a fan of GNU Emacs\' file navigation model. I\'ve been switching buffers with C-x C-f ..., C-x b; C-mouse-1 occasiona

3条回答
  •  滥情空心
    2021-01-19 03:21

    I found this solution from Borbus: https://stackoverflow.com/a/845311/552421

    ;; uniquify changes conflicting buffer names from file<2> etc
    (require 'uniquify)
    (setq uniquify-buffer-name-style 'reverse)
    (setq uniquify-separator "/")
    (setq uniquify-after-kill-buffer-p t) ; rename after killing uniquified
    (setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers
    

    From your example, your buffers would be named "message.py|ui", "message.py|ui2", etc...

提交回复
热议问题