Npp 7.8.8 and Windows notepad show my file differently
-
Hello,
Will post a link to the file. Check line 7. Npp shows an extra tab. Screenshot in the Live Chat
link to the fileThis happens to my PHP and my PS1 files that I ve noticed.
Problem is GitHub seems to agree with the Windows notepad
Momchil
-
It would have been nice if you’d embedded the image here, too. To be kind, I went and grabbed the image from the live chat and pasted it here, because otherwise it will scroll into the far history of the chat in a short amount of time, rendering this thread very difficult to understand:
So, it looks like you have Notepad++ set to 4-character tabs, whereas MS Notepad always displays tabs as 8 characters. The
If
line likely has a single tab, but the}
line likely has 8 space characters instead.If you want to see the actual space characters – whether something is a space or a tab – please use the View menu, Show Symbol > Show Whitespace and Tab. Spaces will render as middle dots
·
, and tabs will render as long arrows→
.I have shown below what I think you want, and what I am guessing you actually have.
If you want to fix it (make the tabs and spaces consistent), you can use the Edit > Blank Operations sub-menu to do things like converting all tabs to spaces, or converting leading spaces to tabs (whichever is your preferred).
I also suggest setting your Settings > Preferences > Language to make sure the tab settings are the way you like them. If you want tabs in most/all of your files to be the same, use the
[Default]
entry at the beginning of the Tab Settings selector box. If you want PowerShell to be unique in the tab settings, scroll down and selectpowershell
, and uncheck theUse default value
box, as I have shown in the screenshot above.—
PS:
For your reference, the official Settings > Preferences > Language documentation at https://npp-user-manual.org/docs/preferences/#language -
That was extensive. Thank you. For real.
Now, turns out Npp was right and notepad and github are wrong.
That’s what I get for copy and pasting code from random sites.Glad it was sorted. Saves me a bunch of time.