Questions tagged [whitespace]

for questions about handling white or blank spaces. Besides space characters, Emacs is configured to handle the following as white space characters: tabs, indents, newlines that create blank space between text, either horizontally or vertically.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
431 views

Display tab characters as arrows of varying length

I would like to make tab characters ("\t") display as arrows of varying length, just like in editors such as Notepad++, gedit, Geany, etc. Here is an example with tab width set to 4 and space ...
3
votes
0answers
351 views

How to delete all white space during save except for final new line

I am aware that it is a good idea to have one blank line at the end of each file. I am also aware that extra white space in a file is bad. Currently in my .emacs file I have (add-hook 'before-save-...
3
votes
0answers
101 views

How to hide the extra period in linum mode when you have whitespace mode enabled?

I have linum mode and whitespace mode enabled. This works great except that I want padding in linum mode (which uses a space) and so, instead of there being a space (or a different colored space as I ...
2
votes
0answers
175 views

How to display and format leading spaces (spaces at the beginning of a line) with whitespace-mode?

I want to see all spaces at the beginning of a line as dots. Also tabs and line breaks. So I've set my init.el file as the following: (setq-default indent-tabs-mode nil) (setq whitespace-style '(...
2
votes
0answers
108 views

How can I define `search-whitespace-regexp` so it accepts a Unicode “no-break space”?

I'm writing a lot of Markdown for input to pandoc, so my files contain a lot of Unicode non-breaking spaces (U+00A0). I'd like those to search as whitespace with isearch-forward, so I tried adding ...
2
votes
0answers
41 views

Are there any packages or configuration snippets for better whitespace traversal?

Whitespace traversal in Emacs is atrocious. By "traversal" I mean: Moving the point with C-<direction> Expanding a selection (with either a package or region mark) Deleting with C- or M- ...
1
vote
0answers
47 views

How can I split LaTeX inline math from preceeding or following sticked words?

I have this LaTeX code: Lorem $math$ ipsum $math$dolor sit consecteruer adipscing elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua. $math$Ut $math$ enim ad minim veniam$math$, ...
1
vote
1answer
40 views

delete-trailing-whitespace on save while always preserving location of cursor

I have the following before save hook defined which deletes all trailing whitespace and converts tabs to spaces (except in makefile mode since makefiles need tabs to work). This works great, however, ...
1
vote
0answers
40 views

How do I end an org capture template with whitespace?

I want to make an org capture template that ends in whitespace. Specifically, I want to make TODOs that are scheduled. From emacs -Q, I'm starting with this template: (cl-pushnew '("T" "TODO ...
1
vote
1answer
50 views

Can I get whitespace-mode to display a sequence of two leading spaces , specially?

Like this: I have been able to get whitespace-mode to display dots for leading spaces. But I want to specially display each sequence of 2 leading spaces, with maybe a vertical bar. Possible? ...
1
vote
0answers
164 views

How to get hungry-delete working in paredit-mode?

Using hungry-delete is really nice, see this Blog post. But with paredit activated, hungry-delete functions are not triggered. paredit defines <delete> as paredit-forward-delete and DEL as ...
1
vote
0answers
61 views

auto-fill-mode fails in comment with empty second line

Consider the following comments: ;; This is the first line of a comment. ;; ;; This is the second line, which begins a paragraph. If I have ;;auto-fill-mode enabled, I lose the leading space! ;; ...
1
vote
0answers
62 views

Increase spacing between physical lines only

How can I add spacing where there are linebreaks in the file, but not where a line is word-wrapped? This would be very useful for reading log files with long lines. Here's a mockup of what I'm after: ...
0
votes
0answers
11 views

Stop indentation from altering pre-formatted text

.preformatted { white-space: pre-wrap; } <div class="preformatted"> THIS TEXT IS PREFORMATTED <= no spaces there, before pasting this text in this code ; It should render ...
0
votes
0answers
66 views

What is causing `delete-trailing-whitespace`?

In some buffers (e.g. diff buffers) the trailing whitespace is essential to the format and must be preserved. What is causing Emacs to invoke delete-trailing-whitespace whenever I save the buffer? ...
0
votes
0answers
120 views

Possible to modify 'whitespace-display-mappings' at runtime?

Making changes to whitespace-display-mappings while emacs runs doesn't seem to do anything. (setq whitespace-display-mappings '( (space-mark 32 [183] [46]) ; middle-dot (tab-mark 9 [9654 9] [...