white space added on one line and removed on the next line in the same git commit - ide

This is a really annoying random issue. What cause this? Is there a way I can prevent it?
I see that Bitbucket has an ignore whitespace option but it seems like that just encourages a sloppy whitespace free-for-all on a team.

there are actually spaces being saved there which is evident from the different green shade.

Related

neovim ignores newline on paste

Using neovim version v0.8.2 when pasting multi-line text from the system clipboard (not an internal register), the newline characters get stripped away, undesirably resulting in a single line.
Querying the termpastefilter, the value is on the defaults - "BS,HT,ESC,DEL".
When pasting, neovim asks for a confirmation before pasting due to the fact there are control characters in the pasted string and in the confirmation message, part of the text is revealed with the control characters escaped, where one can clearly see the \n characters, however after pasting the string they get stripped.
The terminal emulator is urxvt version v9.31.
How can one undo this behavior?
I've the same "problem" but sad news:
More information would be needed - what are "incorrect line endings" and have
you disabled the confirm-paste plugin? If not, which option did you chose?
Also for some reason when i open the terminal, half the screen is
flushed. This seems to have been reported here already:
Yes, that is a race condition between your wm and urxvt. It can happen
with all terminals and also older versions of urxvt, but happens much
more commonly in the current version. We have plans to address this,
but are not sure what the right course is, yet, as it is not a bug.
A workaround of sorts is to output some newliens so the prompt is at
the bottom (which is where it will end up anyway, under normal use),
or specify a geometry larger than the screen and let your wm shrink
it, which has pretty much the same effect.
Source is the official mailing list which can be found here: http://lists.schmorp.de/pipermail/rxvt-unicode/2023q1/002650.html
As a workaround I will temporary transfer terminator.

Prevent unecessary line break

I'm kinda lost with the whole eslint/vetur/prettier config, how do I prevent this from happening ? It make the code take a lot more space, pushing neighboring stuff out of view.
PrintWidth won't change anything.
(note : theses are two different exemples stitched in Paint, the space between is not part of my issue)
Line break nightmare

how to remove a whole line when it's blank in VSCode just like in IntelliJ

When removing a line in IntelliJ if it's in brackets and if it's just white spaces the whole line would get removed, So I wanted to know if there is any way to make that happen in VSCode and if there is how do I do it?
There is an extension called Hungry delete, it did exactly what I wanted.

Is there an extension to beautify a Processing sketch?

I haven't used Processing in many years. I am copying some old code into Processing and it is pasting onto one line. Is there a beautify extension for Processing 3? Have looked and can't find.
What you're talking about is called auto-formatting, not beautifying.
The Processing editor includes an auto-formatter. Just go to Edit > Auto-Format, or press ctrl+t to do it from the keyboard.
Alternatively, most code IDEs like eclipse also include auto-formatters.
However, if everything is on one line, it sounds like you're dealing with an issue copying the newline character. This can happen if you copy something from one OS to another, for example. You might be able to google for a tool that fixes this problem, but it might be simpler to just put in the line breaks manually and then use the auto-formatter to handle the indentation for you.

Can I make IntelliJ IDEAs auto indent ignore previous lines?

Auto-indenting in IntelliJ IDEA seems to automatically takes lines previous to the selection in to consideration. This means that if the indentation is incorrect in the part of the file you're working on (e.g., 3 or 5 spaces where there should be 4, or even worse, a mix of tabs and spaces) it's annoyingly difficult to add correctly indented code.
Both new lines I'm adding and lines I use auto-indent on because I've changed them anyway get messed up like this. Since the file I'm working on is being worked on by someone else as well on another branch, I really don't want to modify over a third of the file just to indent everything correctly, but I would still like the lines that I'm actually modifying/adding to be correct - I don't see any reason to perpetuate the error when it's not necessary.
Currently the best mechanism for fixing it I've found is to manually do the spaces on a line and go from there, but it's really quite annoying, especially since I can't use the tab key or IntelliJ will immediately move to the incorrect indentation. It's barely better than copy/pasting the text to Sublime Text, fix the indentation there and paste it back without formatting.
My apologies if this has already been asked, I've tried to search for it, but it's very hard to search for this as there's so many auto-indent questions.
IntelliJ IDEA recently added a feature (in v14 or 1v4.1 if I recall) where it will detect indentation that is different from your settings. It will honor those indentations (in order to keep the file consistent). Usually as soon as you start editing the file, you get a banner, although that can be turned off. The banner looks like this:
This allows you to modify this setting on a per file basis, or turn it off completely (i.e. the "Show Settings" option).
I suspect this feature is what is causing you the issue. I am not sure how it handles a case where a file has mixed indentation (e.g. most of the file is 4, but some sections are 3 or 5 spaces). You can try turning this feature off in Settings > Editor > Code Style > "Detect and use existing file indents for editing"