Intellij uexpected quote behaivor - intellij-idea

When I start typing a quoted text I hit " and begin typing my text. At the end I hit again " to close the quote.
However, what happens next is completely wrong and annoying.
In the picture above the ending quote is underlined. In order to fix it I have to type any character to make it go away. The typed character is not printed and the underline form " goes away.
When I don't do this and now put the cursor to another position in the code while the " is still underlined and start typing again the first character at the new cursor position is the ". The " where it was before is removed or moved to the new cursor position.
How can have a normal quote behavior?
I couldn't find any other quote setting in the config.
Btw. The Insert pair quotes setting is disabled
Intellij 13.1.5, MacOS 10.9

Normally I use a US layout to hack and the German layout for anything else.
I always wondered what is the actual difference between the US Layout and US International (PC) layout. Turns out, that the described problem in my question is one of those differences.
After switching from US International (PC) to US Layout, the problem is gone.

Related

IdeaVim Deleting from current position until semicolon

For regular VIM it is possible to delete characters through a certain character, as evident in this post about deleting from current position until a space. This seems to also work in IdeaVIM for the most part. For instance, pressing "dfx" will delete through the character "x". However, if you specify the character as ";" IdeaVim will not behave as expected. Instead of deleting through the semicolon, it does nothing. Is there a way that I can have ";" accepted as a valid character for this IdeaVIM command?

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

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.

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.

Add quotation marks to selected word via shortcut

Is there any way (Plugin, Script) to add quotation marks (or square brackets or parentheses) at the beginning and the end of selected text via a keyboard shortcut in the Kate editor?
I think of something like selecting a word and then pressing Ctrl-U (this would upcase the selected word). Is there something similar for quotation marks?
The "Configure Shortcuts" menu does not provide this option.
This should be possible to do by using Kate's Javascript plugin system: http://docs.kde.org/stable/en/kde-baseapps/kate/advanced-editing-tools-scripting.html.
By finding the word at the current cursor position and inserting text before and after, you could create a “surround with quotation marks” function.
For an example of a Kate script, see here: http://kucrut.org/move-cursor-to-next-prev-paragraph-in-kate/.
One solution would be the following:
Go to Settings > Configure Kate > Editing
Activate the Auto brackets option
Now you are able to wrap the selected text with brackets.
Though there is one drawback. The Auto brackets option is "always on", meaning that once you type "(" the corresponding ")" also comes up.

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])