Questions tagged [whitespace-mode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
191 views

How can I display tabs and spaces in Doom Emacs?

I have tried M-x whitespace-mode but it does not do anything.
user avatar
0 votes
1 answer
56 views

How to stop Emacs from highlighting Linux Tab characters?

So I opened a c++ script made in Xubuntu and every tab character was highlighted with grey. That doesn't happen when I open scripts made on Windows. How do I stop Emacs from highlighting them, it's ...
user avatar
  • 3
1 vote
0 answers
21 views

whitespace-mode does not display hidden characters in a patch file

I have a patch file on which if I do cat -A , I get : if (zif->rtadv.AdvIntervalOption)$ {$ struct nd_opt_adv_interval *ndopt_adv = $ ^I(struct nd_opt_adv_interval *)(buf + len);$ But ...
user avatar
  • 127
0 votes
0 answers
70 views

Changing global-whitespace-mode options locally to a particular buffer

I want to customize the behavior of global-whitespace-mode on a per-major-mode basis, and also define some interactive commands that change what's being highlighted on a per-buffer basis. global-...
user avatar
  • 181
1 vote
1 answer
54 views

whitespace-style "face" activates highlighting of quoted string in fundamental mode

After putting face to whitespace-style: (setq whitespace-style '(trailing tabs empty face)) (global-whitespace-mode 1) string enclosed in a double quote started to be highlighted by font-lock-string-...
user avatar
  • 3,132
0 votes
1 answer
92 views

Whitespace-mode: highlight hidden indentation of empty lines

I use whitespace-mode, intend with tabs (colored pale yellow, which is what I want) and I am wondering about the situation where there is an empty line inside an indented block (see image below). I ...
user avatar
0 votes
1 answer
88 views

Disable white-space mode emacs-26.3

I tried to highlight lines that exceed 80 columns using whitespace-mode. Eventually didn't like that idea and removed that from my init.el. However, the whitespaces are shown as . and line ends are $ ...
user avatar
  • 105
2 votes
0 answers
288 views

How to display only leading spaces in whitespace mode

I've been having trouble getting whitespace to visualize properly. Specifically for 'spaces' I'd like to only display leading spaces, but turning on space white space visualization includes all spaces,...
user avatar
1 vote
0 answers
115 views

whitespace-line-column highlight basing on the column number instead of char count

config (require 'whitespace) (setq whitespace-line-column 80) ;; limit line length (setq whitespace-style '(face tabs empty trailing lines-tail)) For first line, whitespace-mode correctly highlights ...
user avatar
  • 760
0 votes
1 answer
156 views

Is it possible to use whitespace-mode without specyfing a background (or foreground) color?

I like having non-breaking spaces and a few other characters represented in my buffer as visible characters. The problem I have is that whitespace-mode seems determined to set the background color. In ...
user avatar
  • 121
2 votes
1 answer
128 views

whitespace-cleanup stopped working

I'm not sure what I did, but I'm trying to use M-x whitespace-cleanup in a python file and nothing happens. How do I debug this?
user avatar
  • 419
1 vote
1 answer
738 views

Disable whitespace-mode for single mode [duplicate]

I'm using global-whitespace-mode with a particular whitespace-style as a default for all modes. How can I disable whitespace-mode completely for a single mode, eg. incoming email? I tried the ...
user avatar
  • 441
0 votes
2 answers
743 views

Highlight useless whitespace at end of file

How do I make Emacs highlight whitespace at EOF, eg. any whitespace after >?\n for PHP? I think the general rule would be: After the last non-whitespace character, accept one newline, then ...
user avatar
  • 441
4 votes
3 answers
219 views

magit-status does not open, when using (global-whitespace-mode 1)

This problem started happening today when I switched to my desktop computer after a couple months of using my laptop. I updated emacs to 25.3.1, updated all my packages, and downloaded my latest ....
user avatar
0 votes
1 answer
42 views

Space and line-end indicators stay after switching off whitespace-mode

When I switch on whitespace-mode I get all the indicators and color for showing superfluous whitespace. So far so good. But when I switch off whitespace-mode the space indicator . and the line-end ...
user avatar
  • 1,041
1 vote
0 answers
98 views

How to display Unicode bidi markers only in Whitespace mode?

There's a way of displaying Unicode bidirectionality markers. The problem is: it makes them visible all the time. Is it possible to show them only in whitespace mode? PS I'm not chained to the method ...
user avatar
  • 1,399
1 vote
1 answer
69 views

What kinds of whitespace are visualized in Whitespace mode?

According to the Emacs manual (section 14.16 Useless Whitespace): The kinds of whitespace visualized [in whitespace mode -- Evan] are determined by the list variable whitespace-style. However, ...
user avatar
  • 1,399
0 votes
3 answers
1k views

Custom whitespace-line-column for specific modes in whitespace-mode

I want to force whitespace-mode highlight line after 99 character in rust-mode (cuz this length recommended by guidelines). For other modes i want to leave this variable with default value(80). How ...
user avatar
  • 225
1 vote
1 answer
414 views

How to toggle whitespace mode in evil insert state?

I'd like to disable whitespace-mode while in evil insert state. The following hooks work, but require refreshing all font colors with (font-lock-fontify-buffer), and even then- sometimes it fails to ...
user avatar
  • 7,179
1 vote
3 answers
132 views

How can I switch whitespace-mode enabled/disabled by key?

(defun switch-whitespace-mode () (interactive) (whitespace-mode) ) (global-set-key (kbd "<f6>") 'switch-whitespace-mode) Through the above configuration,I failed.
user avatar
  • 76
6 votes
1 answer
132 views

Whitespace highlighting

I've tried whitespace-mode, but I can't configure it the way I want. There are others, but some of them are obsolete and I don't want to try them all. I always indent via tabs and can't stand ...
user avatar
2 votes
1 answer
381 views

How to set whitespace-line-colum per mode?

I'm trying to have whitespace-line-column set to 80 in prog-mode and 100 in web-mode, etc. However when using hooks seems to get ignored, as is always set to 80. (require 'whitespace) (setq ...
user avatar
  • 197
4 votes
1 answer
301 views

distinguish inner consecutive spaces

I'm aware of and use whitespace-mode to great effect. I don't show a glyph/character for spaces because I think it's too noisy and unnecessary. I do highlight trailing spaces red which is great. ...
user avatar
2 votes
1 answer
657 views

disable whitespace mode on new buffers

After doing an some emacs packages updates, every time a new file is opened the buffer has whitespace mode turned on. I see red on all the whitespace at the start of lines. I've tried disabling ...
user avatar
  • 161
1 vote
1 answer
208 views

How to visualize trailing blanks and any tab characters (even non trailing)

I would like to visualize tabs. Here, I almost succeeded: (setq whitespace-style '(face trailing tabs lines-tail indentation)) face is needed for other things to work; trailing visualizes trailing ...
user avatar
  • 4,773
3 votes
0 answers
238 views

mix spaces and tabs in python mode

Is it possible with whitespace-mode (or another mode) to only show mix spaces an tabs (in python mode) ? Only highlight if: there is space before tab or tab before space there is space and indent-...
user avatar
  • 3,016
3 votes
1 answer
654 views

Whitespace mode write dots for space chars

I'm using org-indent-mode. As far as I understand, the whitespace on the left is an overlay. When you use this mode in conjunction with whitespace-mode, then there appears whitespace indications (...
user avatar
4 votes
1 answer
407 views

Whitespace-mode characters: customise mapping of printable character representations

The whitespace-mode has a default mapping from whitespace characters to printable characters: U+0020 → U+00B7 “·” U+0009 → U+00BB “»” U+000A → U+0024 “$” etc. How can I change which printable ...
user avatar
  • 537
1 vote
1 answer
894 views

Emacs whitespace mode doesn't show ^M characters

Somebody in my team has checked in a file with MS-DOS line endings into the git repo. with vi's binary mode, vi -b hello.py, i can see lines ending with ctrl character - ^M. In emacs, whitespace-...
user avatar
  • 1,887
0 votes
2 answers
1k views

whitespace-mode doesn't show the space characters

I need to see the space characters but I can't set it for the life of me. I went to customize the Whitespace Display Mapping and this is what I found. Notice that the mapping for the space is set to ...
user avatar
2 votes
1 answer
741 views

Enable whitespace-mode with Prelude in C++-mode

With a vanilla install of Prelude and with C++-mode as my major mode, M-x whitespace-mode no longer shows whitespace characters. I get a message indicating that I am toggling whitespace-mode on and ...
user avatar
3 votes
1 answer
599 views

whitespace-mode ignores whitespace-line-column

In ~/.emacs I've globally enabled whitespace-mode: (require 'whitespace) (setq whitespace-style '(face empty tabs lines-tail trailing)) (global-whitespace-mode t) Example buffer content: -*- fill-...
user avatar
  • 989
8 votes
2 answers
2k views

Only enable whitespace mode in certain buffers

I would like to have whitespace mode turned on for all buffer except for org-mode ones. It is easy to do this when emacs starts up, but since I use a persistant copy of emacs with emacs daemon mode I ...
user avatar
  • 195
3 votes
1 answer
360 views

Can I modify whitespace mode to distinguish hard and soft newlines?

Currently, whitespace.el shows me newline characters by changing the display table to show a $ at the end of lines. I don't actually find this useful, so I disable it while I enjoy the many other ...
user avatar
16 votes
2 answers
768 views

Only doing whitespace-cleanup on the lines touched

For most projects I work on I use a before-save-hook to run whitespace-cleanup. This is fine when everybody on the team cleanups up their spaces but sometimes I am involved in already running ...
user avatar
  • 551
6 votes
2 answers
690 views

Prevent whitespace-mode from overzealously highlighting blank lines at end

When using Whitespace Mode with the empty style enabled, the blank lines at the end of a file aren't highlighted if I'm on the very last line. However, I also don't want them to be highlighted if I'm ...
user avatar