Display path of file in status bar

后端 未结 5 748
遇见更好的自我
遇见更好的自我 2021-01-30 21:41

GNU Emacs 23.1.1

I am wondering is there a way to display the path of the file in the status bar, instead of just the filename.

I have to open many files in many

5条回答
  •  庸人自扰
    2021-01-30 21:49

    If you are ok with seeing this as the frame title instead of in the status bar, which I personally prefer because it is less cluttered and is useful also when switching windows with Alt+TAB, etc., then you can add something like the following to your .emacs file without installing any extensions:

    ;; Disable loading of “default.el” at startup,
    ;; in Fedora all it does is fix window title which I rather configure differently
    (setq inhibit-default-init t)
    
    ;; SHOW FILE PATH IN FRAME TITLE
    (setq-default frame-title-format "%b (%f)")
    

    %b will show the buffer name as usual, and %f the full file path. You can of course change the order, add text in between, remove %b, etc.

提交回复
热议问题