reddit / emacs

Emacs fringe-hide minor mode to hide left, right or both fringes in current buffer

ir33k · 2022-02-08 00:53
Hello again. I found that function "M-x fringe-mode" can hide fringes only in all windows of all frames. I wanted do to that for one buffer. Its not that difficult but there is no interactive function for it. Or maybe there is?? If so please let me know. Anyway, there you have it. Yet another Emacs minor mode https://github.com/ir33k/fringe-hide Maybe it will be useful for someone. I personally like to have left fringe hidden, with wrap-mode enabled while typing some plain text that will be copied and pasted outside Emacs. Like this one ;d
7890yuiop · 2022-02-08 02:35
Worth noting that for non-interactive use-cases you can set `left-fringe-width` and `right-fringe-width` (these are automatically buffer-local), or do things with `fringe-indicator-alist`, e.g.: https://stackoverflow.com/questions/27845980/how-do-i-remove-newline-symbols-inside-emacs-vertical-border
ir33k · 2022-02-08 08:10
That's what the code does. You have to also call `set-window-buffer` to see effect of new values. There are few other ways described in `(info "(elisp) Fringe Size/Pos")`. But using those vars is the best. Note that this minor mode also adds a little margin in place of hidden fringes. It does so to avoid text beginning and ending right on the first window edge pixel. This is default behavior but can be avoided.