Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [whitespace-mode]

The tag has no usage guidance.

0
votes
1answer
38 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?
1
vote
1answer
158 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 ...
0
votes
2answers
110 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 ...
3
votes
3answers
140 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 ....
0
votes
1answer
23 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 ...
1
vote
0answers
53 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 ...
1
vote
1answer
49 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, ...
0
votes
3answers
514 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 ...
1
vote
1answer
217 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 ...
1
vote
3answers
77 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.
6
votes
1answer
94 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 ...
2
votes
1answer
217 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 ...
4
votes
1answer
168 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. ...
1
vote
1answer
423 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 ...
1
vote
1answer
123 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 ...
3
votes
0answers
187 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-...
3
votes
1answer
420 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 (...
2
votes
1answer
124 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 ...
1
vote
1answer
390 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-...
0
votes
2answers
744 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 ...
1
vote
1answer
477 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 ...
3
votes
1answer
411 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-...
8
votes
2answers
1k 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 ...
3
votes
1answer
206 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 ...
15
votes
2answers
588 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 ...
6
votes
2answers
529 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 ...