Questions tagged [whitespace]

76 questions
325
votes
6 answers

How to match whitespace in sed?

How can I match whitespace in sed? In my data I want to match all of 3+ subsequent whitespace characters (tab space) and replace them by 2 spaces. How can this be done?
Peter Smit
  • 9,636
113
votes
12 answers

How do I automatically trim trailing whitespace with Notepad++?

I don't want to delete the empty lines completely, but I want to remove the trailing tabs and whitespaces in them. Eclipse usually does it (through a preference setting) when we save the file. For example, the file before saving ($ = end of…
Srikanth
  • 5,219
87
votes
10 answers

Is there a way to not select whitespace after a word when double-clicking?

In Windows, it seems the default behavior when double-clicking a word is to select the word, and any whitespace following the word (spaces or tabs). You can see this behavior across all programs, so I'm assuming this isn't a per-program setting.…
Doozer Blake
  • 1,005
71
votes
4 answers

Jump to first non-whitespace character in line in emacs

I'm looking for the emacs equivalent of vi's ^. How can I move my cursor to the first non-whitespace character in a line?
56
votes
4 answers

How to insert tab character in Text mode?

I have tried to parse a file language_data.txt, which is edited by Emacs. The different columns are separated by tab characters. But when I opened the file, I found that each of the tab characters had been replaced by many space characters. For…
Chen Yu
  • 735
31
votes
1 answer

how can I tell vimdiff to ignore whitespace?

I made a number of changes in a file I'm working on, including indentation changes. I'm using vimdiff to compare the file to the original version, and I don't want to see these changes, since they're basically cosmetic. How can I tell vimdiff to…
28
votes
5 answers

How to start/open a file/folder that contains space in its name through command-line?

I'm trying to use the start command in the command prompt to open files and folders, but I'm unable to open files and folders that contain space(s) in their name. I have tried the following queries (testing on C:\Program Files): start C:\Program…
amiregelz
  • 8,297
22
votes
3 answers

How can I write space in Terminal on OS X?

I have a folder name with a space between words. I tried to use cd to move into that folder but it didn't work. How can I write space in Terminal on OS X? I tried following MacBook-Pro:TestDrop Alexsander$ cd October Fall -bash: cd: October: No such…
21
votes
2 answers

Show whitespace characters in printout

I need to render an ASCII file for printing in a way that removes ambiguity if (very unlikely) one decides to type it in and validate the signatures. I am giving the 8-bit symbol-set QR code as an alternative, but a manual validation would be a…
qdot
  • 936
19
votes
6 answers

Difference in whitespace between two files on Linux

I have two files that when I compare with diff show that every line has changed. When I compare them with diff -w (ignoring whitespace) it shows the few minimal changes that I expect. Obviously there is some difference between the whitespace in…
Romski
  • 335
12
votes
3 answers

Improve display of whitespace on notepad++

Can you improve the visibility of whitespace using notepad++? I tried Settings > Style > Whitespace Symbol, and am able to change the color as needed, but I still find the symbols incredibly small and hard to find. My resolution is 1280x, so that…
zuiqo
  • 696
10
votes
2 answers

Trim trailing newline in one-liner bash alias

I'm trying to write a simple alias on my Mac OS X terminal to copy the current working directory. I have this: alias cpwd="echo \`pwd\` | pbcopy; echo \"Copied \`pwd\`\"" Then I can just run the following to copy it: $ cpwd Problem is that echo…
9
votes
2 answers

Delete whitespace left and right in Notepad++

In Notepad++, is there a hotkey to wipe all white space left and right of the cursor? I'd imagine it would be the same as "delete current word", but I can't find it. Ctrl + Del deletes to the end of the word Ctrl + Backspace deletes to the…
MrSparkly
  • 237
9
votes
2 answers

How to remove strange space symbols in Word

I got Word files from one guy, written in Russian and convert them to HTML. These files contain some strange white-space characters, for example: This looks like small zero (I changed mode to show special characters). In hide mode it's just…
Alexan
  • 307
8
votes
1 answer

Windows Batch. Append to PATH Environment Variable, when It Contains Spaces

I want to add some binaries to path for my console session and I'm doing it like so if not defined WIXTOOLKIT_IN_PATH ( set WIXTOOLKIT_IN_PATH=1 set MY_PATH=%~dp0..\tools\wix SET PATH=%MY_PATH%;%PATH% ) But it happens so, that my PATH…
1
2 3 4 5 6