3

Helm-mini displays a yellow @ when a file or buffer is remote (in my case accessed via tramp/ssh), which I find quite handy. I'd like to add such a marker to the buffer name part of my modeline, but I'm not sure what's the best way. I'm using powerline.

cjauvin
  • 594
  • 4
  • 15

2 Answers2

2
  1. Define a separate face, e.g., my-remote-buf, that you use to show remote buffers.

  2. Set mode-line-buffer-identification to use that face when the buffer is remote:

    (setq mode-line-buffer-identification
          (list (propertize (car mode-line-buffer-identification)
                            'face 'my-remote-buf)))
    
Drew
  • 75,699
  • 9
  • 109
  • 225
-1

Would rename-buffer function be what you are looking for? You could use a hook to append @ to a buffer name if you'd like to do it automatically.

Russ Kiselev
  • 464
  • 3
  • 10