Intellij: delete all blank space until next non-blank character - intellij-idea

There is no easier way to explain what I want to do than a picture:
I would like to reduce the time it takes me to refactor HTML code by deleting all the white space behind (or before, doesn't matter that much) my caret until the next non-blank character, emphasized by the highlighted blue whitespace I would like to delete. I found a way to do this on vim, but I want to do this on Intellij.

Try Ctrl+Alt+J (⌃⇧J on Mac) on the <a>... line to perform the 'Join Lines' action.
More information on the feature can be found here and here.

Related

How to shift multiple lines of code in IntelliJ by a single space?

Am trying to shift multiple lines of code in intellij IDEA by a single space using Tab shortcut but it always shifts by 4 spaces rather than a space. I have tried Edit > Convert Indent > To spaces but to no avail.
How do you shift multiple lines of code by a single space without messing with the default configuration for the file?
As #Andrey already suggested, I would use the Multi Cursor feature that has been around since intellij idea version 13.
I like the Add selection on Next Occurrence feature very much. It helps me to edit multiple lines very fast.
This screenshot shows the action in the Settings -> Keymap screen.

Intellij IDEA 14 - remove indents on empty lines

I have an annoying bug regarding intellij 14.0.3. The issue is that it keeps indents on empty lines and I can't remove that whitespace in any way. Under code style, I have not checked the checkbox "keep indents on empty lines" and judging from the display how that functionality works I'd say it would do it.
However, it still keeps the indents and that creates bad diffs in git since whitespace is added. Is this a bug? Can I in any way remove them? I have tried to uncheck that checkbox under both the language I use and the main one. None of them seems to change it.
Try enabling the Strip trailing spaces on save option in Settings/Editor/General.
You can choose whether this should be performed for All lines or only the lines you modify to avoid creating unnecessary diffs.
The whitespace is stripped when you explicitly hit CTRL+S or automatically after some period (IntelliJ has autosaving).
One thing to note is that if you have cursor on an empty line and there are some spaces before it, hitting CTRL + S won't strip the whitespace, because this would probably be annoying as your cursor would jump to the beginning of the line if the file was autosaved by IntelliJ (I read somewhere on YouTrack that this was a design decision).
Here is a screenshot of the option I describe:
What I did to strip spaces without having to open & save each file is running a regex in the find and replace window:
Ctrl+Shift+R
Text to find ^ +\n Find every line that starts with (^) one or more spaces ( +) and nothing else (/n).
Replace with: \n A new line.
General > Regular expression (obviously important to check this box)
Eventually you may want to limit the scope because this will be quite the lengthy operation
Find and eventually continue if IDEA warns for the high amount of occurrences.
Click All Files to run the actual replace operation. It might take some time before IDEA to respond.

Intellij Idea Code wrapping when formatted

I am new to Intellij Idea. I didn't find any information on how to wrap the code after certain characters (ex: 150 characters, break the line)
I want to break the code after the vertical line, the following code must come in next line.
Note: I used Reformat code option, but it did just realigned the code with some white spaces etc, but not wrapping up the code. It's difficult to see the end of the code.
You go to Settings (alt+ctrl+s) then select Code Style - General
Here you can configure your margins and if you want the code to wrap after it reaches the end of it

TextMate: How do I move my cursor out of the quotations without using the arrow keys?

I was programming in PHP and typing mysql_connect, and by default the single-quotation is automatically closed, so I would have something like this mysql_connect('localhost[cursor is here]'). I still need to type my username and password, it just seems really out of the way to press the right arrow key to escape the single-quotations for writing the other arguments (username/password). Is there a hot key similar to ctrl+enter that can help move my cursor out of the quotations but not to the next line?
I often use Cmd-Right Arrow to move the the end of the line. I also make heavy use of Opt-Right Arrow and Opt-Left Arrow to move words at a time instead of characters.
My solution to this was to record my own macro; it moves the caret to the right, inserts a comma and then a space. I've mapped the macro to command and < (shift and comma). Activating the macro on your code results in:
mysql_connect('localhost', [cursor is here])

Incremental paste plugin?

I know that often using a for loop to generate repetitive content is the better way than pasting something 20 times and changing each paste to the correct number by hand. But let's say for cases where content is hard-coded and I just want a list from 1-20.
I would like a text editor with a "smart" paste command that takes any number imbedded in a string on the clipboard and increments it each time I paste. If it doesn't exist, I will make a plugin.
I'm trying to think of a good 2-stroke keyboard shortcut to do it, close to the ctrl-V. Maybe ctrl-g or numpad_+ (in an app with no zooming).
Does it exist?
In Zeus this can be easily done as follows:
Column mark the area to be converted to a numbers
Use the Macros, Execute Script menu
Type in numbers to run the numbers Lua macro
Type in the first number of the sequence
The marked area will be replaced by an incrementing sequence of number starting at the first number provided in step 4.
I'm trying to think of a good 2-stroke
keyboard shortcut to do it,
Making this into a key stoke action is as simple as binding the numbers Lua macro to the keyboard.
Here is an example of how it works. If 1 values in the text below are column marked and the macro executed with a starting number of 1000:
Field_1
Field_1
Field_1
Field_1
the following text changes will be made:
Field_1000
Field_1001
Field_1002
Field_1003
Armed bear J has a renumber region command, as well as a case-preserving replace-in-files, which means I often keep it around for those features.
TextPad is another text editor with a Fill Region function, for filling with a character, a string, or incrementing numbers (starting from X, with left- or right-alignment, and space- or zero-filled.)
I used Notepad++ now, but I have to keep TextPad around just for that number-filling function.