Autoclose single and double quotes vscode - macos

My vscode does not automatically close the single and double quotes. I've disabled all extensions, but the problem still persists.
vscodeVersion 1.15.0 (1.15.0)
MAC osx: Version 10.12.6 (16G29)

It's worth noting that vscode has a separate editor setting for auto closing quotes from that of brackets. If you have: "editor.autoClosingQuotes": "never" in your settings, then vscode will never close quotes. On the other hand, if you have "editor.autoClosingQuotes": "always", then it will always add the extra closing quote.

Change your keyboard language to US only instead of US International.

FYI: this is a bug/feature, in that the double quotes auto-close when the cursor has nothing to the right of it. However, when there is something to the right of the cursor, then your only get one quote.
<h1 className="|> <== the closing > on the h1 tag prevents the auto-close.
<h1 className="|" > <== the space to the right allows auto-close to work.
I had a similar issue and came across this link that describes it.

Related

Automatic close quotes on Xcode

Is there any way to have a second double quotes placed automatically, when I enter the first one in Xcode? There aren't any settings in Xcode regarding placing a second double quote automatically when entering the first one (like in VSCode eg).
Let the autocompletion work.
i.e.Type print then autocomplete to print(items: Any...) then press "
or ^"
take a look at this https://developer.apple.com/library/content/documentation/IDEs/Conceptual/xcode_help-command_shortcuts/TextCmdsByType/TextCmdsByType.html

NO-BREAK SPACE after quick auto-complete double brace PhpStorm

In Laravel's Blade Template, the use of double braces {{ }} is used quite a lot.
I have a small issue though. PhpStorm will auto complete {{ to the full {{}}
However, as most Laravel developers adds spaces like {{ route('home') }}, I quickly type {{ then add a space.
Normall this would add unicode spaces like %20 on each side of the cursor after auto completion {{ CURSOR }}
However, if I do it too quick, it adds the %A0 (NO-BREAK-SPACE) character instead and does not add the trailing space, causing the statements inside to fail. {{ CURSOR}}
Is there a way, to either fix this permanently - or to default the auto completion of double braces to add the spaces before and after the cursor by default, like it does when typing {! (this might be a plugin)
Edit:
I figured out that my keyboard (Norwegian) has a slight issue with phpstorm perhaps. I use Alt Gr+7 to write a open brace. If I do it too quick, Alt Gr + Space produces a no-break space. I'm trying to figure out now how to either disable that keybind or some other way of ignoring it.
Edit2
It was Ubuntu, see my answer
It appears this was not an issue in PhpStorm at all.
It was an issue with my Norwegian keyboards, Alt Gr + Space and Ubuntu
In ubuntu Alt Gr + Space produces the non-break space character
I disabled this keybind by typing this into my terminal:
setxkbmap -option "nbsp:none"

Aptana syntax highlight issue - JavaScript

After the last update of Aptana it stopped to syntax highlight all of my JavaScript code. I tried to fix this for a couple of days with reinstalling the editor, using Eclipse and install Aptana as a plugin and also tweak different settings.
As you can see on the image all the code after line 224 turns white. And I have not found any specific code combination that seem to trigger this bug.
Worth mention is that some of the code starts to highlight again when you change something in the line and sometimes Aptana still highlights the code further down in the document.
I would really appreciate if someone has a solution on this issue.
my best ~ Pontus
had the same issue. it turned out that there was a "wrong" whitespace character. if you activate the option "show whitespace characters" you can differ between regular "space" characters (marked by a dot in middle of line) and other whitespace characters.
http://i.stack.imgur.com/3bMsg.png --> "wrong" whitespace character in condition (after the "||")

sublime text 2 macOSX double quote issue

When I do shift key + single/double quote key on my mac using Sublime Text 2 I don't get parseable double quotes.
Here's a picture demonstrating the effect on the id=""'s of some HTML:
Does anyone know how to correct this? The correct double-quotes were generated by a different text editor.
I answered my own question. I had installed Sublime's Zencoding plugin which when I removed it, the double-quotes were normal again.
Update: Oddly, this double-quote issue still exists in my PHP files, but not my JS files. I'm not sure how to solve this yet but will update this answer when I do.
UPDATE #2
I finally solved the PHP file double-quote issue. Please see my answer on this SO thread.
I had a a key binding set to use these "typographical" quotes in my SublimeText2 preferences->key bindings->user

Automatically insert closing bracket in Xcode

is there a way to have Xcode append a closing bracket ")" when I type the opening one "("? I know that it does this for those {}. I really miss Textmate :( A generic way to define which chars should be automatically inserted when the opening ones are entered would be kickass.
In Xcode 3.1 go to Preferences->Indentation
Check Syntax-ware indenting to on
and check Automatically insert closing "}"
and choose the characters you want to be inserted when the opening one is.
Also why not use Textmate nothing stops you and Xcode will notice if a file is edited externally
Have a look under Edit->Insert Text Macro->Objective C->Bracket Expression. This will insert a matched pair of brackets (or if you have something highlighted, put brackets around it). You could bind this to [ as a keyboard shortcut.
You can follow the instructions here to create one for parentheses. I tried but couldn't make it work.
http://cocoawithlove.com/2008/06/hidden-xcode-build-debug-and-template.html#textmacros
Personally, I drag the classes folder over to Textmate and edit there. I switch back to Xcode when I need to type in some long method name, or to build. I've been building a library of snippets for some of the common things I do in Textmate to make life easier there.

Resources