Aptana syntax highlight issue - JavaScript - syntax-highlighting

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

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.

Why is VS Code adding many blank lines at the end of all my files?

I just installed Win 10 1809 on my Dell PC, and it seems to run okay. But the first thing I did was start up VS Code. I wanted to run yarn start for my React project, but I had to type it way down in the terminal window, while the prompt was at the top. It worked though.
And when I open any project file, there seems to be approximately 100 blank lines appended at the end of each. But the line numbers don't go down that far and the cursor stops at the last line number. But the scroll bar acts as if those blank lines are there.
So I'm guessing the same number of blank lines are being added to the terminal too. But in the terminal window, the cursor is positioned at the bottom of the scrollable window.
What's going on? Is there a fix?
EDITED:
I see that I can scroll the file's window up until the cursor and last line is at the top, but no further, regardless of the window size. Maybe this has always be the case, and I never noticed. But now because of my terminal problem, I am suspicious of everything and checking for any abnormalities. So I don't think that extra blank lines are being added to my files. Sorry for the mistake.
But the terminal problem persists. The screen clip below shows the terminal display after I enter "yarn start". The typed input shows up way down from the initial prompt, and the blank area is a long string of "0D0A" characters. Sometimes I can click on "kill Terminal" and then start a new one and the new one works correctly. But not always.
Still trying to figure this out.
Can you share snapshots for your problems?
This is some hint for your problem
In VS Code, type
Linux / Windows: Ctrl + Shift + P
MacOS: Cmd + Shift + P
Type Settings to go Settings
At settings, search end of file, at here you can configure something for your problem with auto append blank lines each file
I hope it will help you :)
Your Terminal Problem is described as Bug in VS Code Issues.
As of July 2019 the intergration is pending due to stability problems.
https://github.com/Microsoft/vscode/issues/57803
Addendum (August 2019):
The Problem seams to be fixed with VS Code 1.37.1 and Windows 10 Patchlevel 1903
Did you try uninstalling and reinstalling?
Going back to your questions.
What's going on? No idea.
Fix. Use this extension https://marketplace.visualstudio.com/items?itemName=rintoj.blank-line-organizer
or
Open Visual Studio project and collapse all the folder and make it handy.
Now press “ Control + Shift + H “ key combination and you can see the Popup which shows Find and Replace options.
In the Find place input “^&\n” combination and select Use Regular Expression checkbox without fail as this input will mainly work with the regular expressions only.
In the replace field leave it empty so nothing will be replaced rather remove the empty blank lines.
In the input Find field we have give ^ for Start of the line and $ for end of line and \n which is for new line break.
source for second solution: http://www.f5debug.net/post/2015/01/03/How-to-remove-Blank-lines-between-codes-in-Visual-Studio-Code-editor.aspx
The extension will be useful overall especially when working in a team project where a lot of people might be leaving too many empty lines. Good luck

Sublime Text 3 unable to find text that is plainly there

Hitting cmd+f to find text in SublimeText, I frequently see something like:
Clearly 'someText' exists on the page. Why can't Sublime find it?
Note this sometimes seems to work, and sometimes fails. I can't work out the difference though.
How can I reliably find text with Sublime Text?
I've tried to reproduce this problem with Sublime Text 2 and this is what I found:
If you place caret before the text and the hit find, the text will be found
If you place the caret after the text and then hit find, the text will not be found
It seems that Sublime Text doesn't wrap search by default. You can enable it by toggling the button with the arrow icon (second one from the left of Find what, its tooltip should say Wrap). Then the search works regardless of the caret position.
Look at the buttons right before search box. Sometimes they are just get disabled accidentally, mis-click, or the short-cut get trigged, then the search doesn't behave as expected.
From left to right, RegExp, case sensitive, whole word, wrap(search whole doc, not just below current line), you can see them with mouse pointer hover.
I strongly suggest you to disable those shortcuts to prevent unexpected toggle of these :)
Also, turning off the regex may help you in searching for symbols which have special meaning in regex. For instance, someText(foo) will not be searchable in regex mode without escaping the brackets or putting the search string in quotes.

Clarification of Xcode's Indentation Options?

Xcode offers the following options under
Preferences > Text Editing > Indentation > Tab key:
In leading white space: Pressing Tab inserts an indentation only at the beginning of a line or following a space.
Never: Pressing Tab never causes an indentation.
Always: Pressing Tab always causes an indentation.
I checked the documentation for these options (that's what is to the right of the colons) but I still don't understand. What is "an indentation"? What I'd really like is if Xcode wouldn't act like it knows better than me and try reindenting lines of code that were already perfectly indented (I find it often does this inside of blocks - I'll have my code nested one level more than the line before it, and for whatever reason it tries aligning with the colon that starts the block argument, leading to unwieldy long lines, as if Obj-C doesn't have enough of those.)
Can anyone give me examples of how Xcode's behavior will change if I choose each of those options? Will one of those options make Xcode behave/autoindent the way I want it to?
If what you want is:
if Xcode wouldn't act like it knows better than me and try reindenting lines of code that were already perfectly indented
then the "Tab key" indentation setting has nothing to do with what you want.
Instead, try unchecking "Automatically indent based on syntax" and Xcode will stop changing your indentation level.
Alternatively, uncheck { and } under "Automatic indent for:".
See also: Xcode Text Editing Preferences Help: Setting Source Editing and Indenting Preferences

Visual Studio stack trace in notepad++

This is probably just a setting I'm not seeing, but when I get a stack trace out of Visual Studio's exception helper dialog, it has \r\n after each "line" in the call stack. When I copy this and paste it into Notepad++, it shows up as literally \r\n, visible in the document. Of course I'd like these to be interpreted as CR LF, so everything's on a different line.
Anyone know how to do this?
I know this question is old, but maybe someone will find the solution helpful.
Open find and replace, and
go to the replace tab
In the find box type \\r\\n
In the replace box type \r\n (both without quotes)
Make sure the Extended search mode is selected in the bottom left.
Finally, hit replace all.
.
It took me a while the first time to find the setting. It's View >> Show Symbol >> Show All Characters.
This sounds like a Notepad++ bug. I can paste into regular Notepad and UltraEdit without the side effects you describe.
Like Cerebrus says, you can workaround it on the Notepad++ side by using its search/replace facility.

Resources