Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [whitespace]

Question about how Vim handles non printable characters.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
1 answer
181 views

How to use different rules for highlighting trailing whitespace inside a gitcommit diff?

In my ~/.vimrc, I have: highlight TrailingWhitespace ctermbg=blue autocmd BufReadPost * syn match TrailingWhitespace /\s\+\%#\@<!$/ This highlights trailing spaces, except when I am still typing ...
Flux's user avatar
  • 1,041
3 votes
0 answers
4k views

Any way to display *all* characters?

So, I got it that Vim has no option to display all characters (including whitespace and CR and LF distinctly) I already saw the question How to Display Hidden Characters in vim? and others on ...
gbr's user avatar
  • 139
2 votes
0 answers
397 views

Custom highlights not working in visual splits

I'm a tabs kind of guy, so I highlight leading and trailing white spaces with the following commands in my .vimrc: highlight whiteSpace_trailing ctermbg=red guibg=red highlight whiteSpace_leading ...
solalito's user avatar
  • 373
1 vote
0 answers
38 views

What is the empty space in this document and how do I. get rid of them

Here is my document: What is the thing that my cursor is on? It is definitely not a whitspace as all white space should be marked with ␣. And more importantly, how do I get rid of it? I have tried :g/...
jxhyc's user avatar
  • 135
0 votes
1 answer
525 views

How to configure pylsp installed by Mason with lsp-zero for nvim?

I want to disable a specific error/warning - E203. This is my lsp.lua where I tried to add ignore config according to this doc from lsp-zero git local lsp = require("lsp-zero") lsp.preset(&...
hdw3's user avatar
  • 101
0 votes
0 answers
79 views

How to make `lead` override `trail` in listchars

I have the following lines in my .vimrc. set list set listchars=lead:·,trail:⎵ Whenever I have a line consisting of only spaces, the character shown is ⎵. How can I make vim prefer · in this scenario?...
efthimio's user avatar
  • 101
0 votes
0 answers
34 views

What is the shortkey for adding a space before a word in normal mode?

I have the following text: #Text My cursor is on character T; I want to obtain # Text i.e., to put a space between # and T, without "pressing i and then space". Instead, I want to do so in ...
Naghi's user avatar
  • 101