sublime text 2 macOSX double quote issue - macos

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

Related

How to use vim as less -R? [duplicate]

Recently I've discovered a wonderful terminal multiplexing tool called gnu-screen.
I'm satisfied with it completely. But I've encountered one inconvenience I'd like to improve.
'C-a H' command makes screen log everything to a log file called named 'screenlog.*'.
But encodes control characters in a weird way. For example if you open the log file with 'less' you might see some cryptic characters and the log file is unreadable. You have to run 'less -r' or 'less --raw-control-chars' which helps to encode those control characters correctly.
So far so good. But if you want to edit the log or read it with vim then you encounter the same problem with control characters.
I've googled this problem and looked up at SO but I've been overwhelmed because there's so much info about vim and screen. Unfortunately I haven't found the solution yet.
Perhaps you know the solution for this problem or some workaround.
UPD
Thanks to Frédéric Hamidi's comment I discovered those characters are the terminal escape sequences of font color, etc. Vim as an editor sees them and by default edits them. The plugin Frédéric suggested tells vim to interpret them.
To provide an answer here and finally mark this fixed: The AnsiEsc plugin adds syntax highlighting for ANSI color sequences. So instead of seeing ^[[30m; the following text will be highlighting in the corresponding color, just like when using less --raw-control-chars.

Autoclose single and double quotes vscode

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.

Sublime Text autocomplete suggestions looks corrupt, how to fix?

Not sure what is happening to my installation of Sublime Text, when ever autocomplete drop down appears it is populated with a bunch of corrupted looking suggestions, this just started recently. I have Googled around and have not yet seen another person with the same issue. I've already tried uninstalling, throwing out User/me/Library/Application Support/Sublime Text 3 folder, and re-installing, but still the corrupted text shows up in my autocomplete. I am working on a Macbook Air, I also use a Macbook Pro at work with the same setup and have never seen this happen before?
As established in the comments, you have base64-encoded strings (likely an inline image) elsewhere in your file. Sublime's default autocomplete populates its choices menu with elements from your file, and uses fuzzy matching to bring up selections. Since base64 can contain all letters and numbers, chances are that any sequence you're typing may match, and that string will be brought to the top of the autocomplete dropdown.
There are a couple of ways around this. First, if the base64 content is actually scoped as a string (i.e., it's surrounded by single or double quotes), you can add the following line to your settings (Preferences -> Settings-User):
"auto_complete_selector": "source - comment - string, meta.tag - punctuation.definition.tag.begin"
This should hopefully solve your problem for the time being, with the downside that you lose any other string-encoded information that you may wish to be in autocomplete.
You can also try using an autocomplete engine like SublimeCodeIntel (works for multiple languages, including JS) or TernJS. These can have the option of turning off Sublime's internal autocomplete mechanism, and just filling in the choices with their generated content.

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

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