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.

2 Answers 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)))

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.