Space instead of TABS Issue, when opening files via SFTP
-
Dear community,
I have a strange issue and I am lost.
I have an RaspberryPI on which I develop python3.
I connect to the Raspberry using WinSCP and the SFTP protocol - from my stationary as well as my notebook
Notebook and stationary PC run Windows 10 x64When I am editing files on my stationary PC : Everything is as expected and like anyone of you knows Notepad’s++ behavior, when editing Python files, but on my notebook the opened python files show a line Ending of LF only, while it shows CR+LF on my stationary PC and, more annoying: When I press tab on the stationary PC I receive a TAB (indicated by the arrow) in the text - but on my notebook, I receive four spaces.
I did already check Preferences - Language > Replace by space is not set on both devices,
Encoding is UTF8 on both devices …The interesting part: If I copy the content of the file via clipboard into a new, empty tab: Everything works fine: a TAB press results in a TAB in the file (no spaces).
If I save the new file on the Raspberry and re-open it, the Line-Ending seem correct (now CR+LF) but Tab-presses are again converted into spaces.
Any ideas what is wrong or how I could fix this behavior?
Update: I found out, that it is the pre-selected language causing the behavior. If I select Python as Language, TABs are inserted as spaces (on the notebook only). If I change the language to “normal text” the highlighting is broken but Tabs work as expected. Any Ideas how to fix this so TABs work with Python highlighting?
-
When looking at the Settings > Preferences > Language > Tabs , did you just compare the default setting, or did you compare the Python-specific setting as well. Because your description sounds like the Python tab settings are different.
-
@schlaubstar said in Space instead of TABS Issue, when opening files via SFTP:
on my notebook the opened python files show a line Ending of LF only, while it shows CR+LF on my stationary PC
Are you sure you are opening the same file in both cases, not a duplicate in one case?
Because, this wouldn’t depend upon any Notepad++ setting, it would depend only upon file content.
Raspberry Pi is a Linux file system, so if the file you are opening originates there, it would have LF line-endings. But tools that might bring it to your PC for editing might convert line-endings…which would I’d think be restored when the file is updated to the Pi. But…this is just how I’d think it would work (in other words, could be wrong).
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login