gabrielfelix |
September 13, 2021 13:38 |
Quote:
Originally Posted by gschaider
(Post 812046)
Could you provide me with an example file?
|
I took another look into it and realised that the error was in my editor. I usually edit the OF files in Notepad++, as I use WSL. When I use tab to indent in Notepad++ it adds a different number of spaces than which was already in the file causing problems in indentation. I used nano to check the file after editiong in npp, as npp shown no indentation problems.
In this topic the user had the same problem as I, and the solution that the community came up with worked fine for me. However, I still check in nano if there are indentation issues on the file before running it.
Quoating the discussion:
Question:
Quote:
I'm coding in Python and I really like Notepad++. However, off late when I use tab to indent, it seems fine in Notepad++, but when I run the program I get an indentation error, and when I check my code in Emacs or something, I find that Notepad++ actually adds more tab spaces than it shows on screen. What is happening?
|
Answer:
Quote:
There is no universal tab size, so I always make sure to replace tabs by spaces (so you know what you see is what you get everywhere else as well)
Go to Settings -> "Preferences..." -> Language Menu/Tab Settings and check 'Replace by space'
|
|