Trailing Comma in "settings.json" in VSCode 1.48 - windows

I am a newbie in Vscode, I have started setting up the VScode editor for my Python learning. One thing that is bugging me is Trialing Comma Error in Problem. Could you please help me with this?
Thanks in advance.
enter image description here
Issue details
// Trims lines that contain only whitespace after pressing Enter on them.
"pythonIndent.trimLinesWithOnlyWhitespace": false,
// After creating a hanging indent, press tab to leave the indented section and go to the ending bracket.
"pythonIndent.useTabOnHangingIndent": false
}
,
]

a settings.json file is a dictionary with keys. No array of dictionaries.
the simplest settings.json file with 3 keys
{
"editor.tabSize": 2,
"editor.detectIndentation": false,
"workbench.activityBar.visible": true
}

This is an actual issue: Github Issues site
I am getting the same error. Note as per comments his settings file is NOT 4k lines, this is the "combined" settings file created by VS Code. My actual settings.json file (Win10 location: C:\Users<username>\AppData\Roaming\Code\User\settings.json) is 52 lines, but the file shown by Code with the error is about 3900 lines (Im guessing combined from various sources which I have yet to track down). Will update when fix found - currently some back and forth in the thread (see link).

Related

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

Vimperator (Firefox) macro to copy text

I am using Vimperator 3.8.1 with Firefox 25.0. I have created a macro to solve a problem (details below), and this macro fails at the following point.
Vimperator Macro e:
/foo<Return>cv<Down>y
My macro searches for a string ('foo') in the page, then goes into caret mode, then into the visual mode, and then selects one line of text and then copies that text.
My problem is that when I record this macro, the one selected line gets copied, but when I play it (using play command), nothing gets copied onto the clipboard. Thus, due to this, I am unable to retrieve that info in an automated manner. I don't know what to Google for in this case, so I posting this here on SO.
I will be highly obliged if someone can also explain why this happens the way it does. Please also let me know if something is not clear.
Problem Details
I am using Vimperator 3.8.1 with Firefox 25.0. I have a lot of tabs (about 300 tabs) which contain similar information (only one line is different on each tab). I want to copy that single line from each tab and collate it in one place. That one line begins with the string 'foo' in every case, and each of the 300 tabs has links that can be incremented using Ctrl+a in Vimperator (i.e. ...page=1, ...page=2)
How I plan to accomplish this is as follows. I have an online notepad open in tab 1, and the very first of my 300 tabs open in tab 2. I copy my single line from tab 2, and paste it into tab 1, then go back and increment tab 2 to point to the next tab. I will repeat this macro 300 times to get all the info.
Thus my complete macro will look like
/foo<Return>cv<Down>y<C-PageUp><C-t>p<C-PageDown><C-a>

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

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

Customizing Xcode [fonts, code sense, and more]

How can I make code completion case-sensitive?
How can I make Ctrl-k kill the content of the line and the new line character?
How can I make backspace always delete only one character, no matter what it is? Right now, it deletes spaces in chunks equal to my indent level.
How to change the indentation style in file templates? I like to have the opening brace on its own line.
How can I make the font aliased?
I'm using Xcode 3.2.2.
EDIT: Issues 2, 4, and 5 are solved. 1 and 3 are still open.
EDIT2: ad.3. Yes, I set Xcode to use spaces, not tabs.
3.
Look in Preferences : Key Bindings : Text Key Bindings : Indent Friendly Delete Backwards
If the delete key is mapped to this entry change it to plain Delete Backwards.
2.
In that same preference area, you can see that there is no delete line option to map ^k to.
How can I make code completion case-sensitive?
I don't think that's possible.
How can I make Ctrl-k kill the content of the line and the new line character?
I can't answer that one, you might need to write a script to do it.
How can I make backspace always delete only one character, no matter what it is? Right now, it deletes spaces in chunks equal to my indent level.
Backspace always deletes one character. It sounds like your file has tab characters in it, each one of which takes up the space of 4 spaces by default. You can tell Xcode to use spaces instead by de-selecting Tab key inserts tab, not spaces in the Indentation preference panel.
How to change the indentation style in file templates? I like to have the opening brace on its own line.
You need to create custom file templates. You can find the Xcode templates here:
/Developer/Library/Xcode/Templates/File Templates
You need to copy the appropriate templates to this location:
~/Library/Application Support/Developer/Shared/Xcode/File Templates
You can then edit the template files to use whatever indents you like.
How can I make the font aliased?
You need to use a font that has aliased characters. Try Monaco at 9 or 10 points.

Resources