I cannot locate the settings or other configurations that define the colors and other formatting shown in VS Code's Terminal output. I'd like to mimic or use these settings elsewhere, such as in word processing software, HTML/CSS, or simply a Language Mode when copying & pasting the output into a new VS Code file.
Where is this formatting defined? Also, how can I keep this formatting intact when using the text elsewhere?
When I use vscode's apple-swift-format (whose hot-key is Shift+Option+F) to format my code, the result show it doesn't work with the ../../.swift-format.
I set my custom .swift-format as
"indentation" : {
"spaces" : 4
},
but when I pressed Shift+Option+F, I got the result with indentation spaces 2. And this should be the default configuration.
As for the description from https://github.com/apple/swift-format:
For any source file being checked or formatted, swift-format looks for a JSON-formatted file named .swift-format in the same directory. If one is found, then that file is loaded to determine the tool's configuration. If the file is not found, then it looks in the parent directory, and so on.
Besides, I tried to use command-line-tool to format my source code and it works well in expection, with indentation spaces 4.
So why the vscode/apple-swift-format extention doesn't work in expect? Is this is a bug for the extention?
My swift-format tool's version is 0.50600.0.
enter image description here
I want visual studio code to suggest an autocompletion for an entire line if I start typing the first few characters of any line already in the file, regardless of the content of the existing line. So if this is the content of my file:
this is a line with whitespace
this,is,a,comma,separated,list
And I type this on a new line, I would get a pop-up like any other autocomplete suggestion and I could fill in either of the lines above. How can I do this (and if I can't, is there another editor that has this ability)?
The extension Line Completion does what you want.
You have to configure for which files (language identifiers) it should perform these suggestions. (To prevent to much calculation on large files where you don't use it. See the README page.
I Have a problem that, my vs code terminal does not have the line break after the output
please tell how to add the line break after the output
(1st image is my output and 2nd image is the expected output)
Use this in settings.json when using c++
".cpp":"echo -e",
Open VS Code, go to settings > extentions > Run code configuration open settings.json ( you must have code runner extention installed for this), you must have vscode settings json,
then white code-runner.executorMap on newline inside brackets, you must have something like this
then whatever language you code, add on the end of the String
"; echo -e"
so you must have something like this, for example I code on java
the result is this
I have a bizarre problem: Somewhere in my HTML/PHP code there's a hidden, invisible character that I can't seem to get rid of. By copying it from Firebug and converting it I identified it as or 'Zero width no-break space'. It shows up as non-empty text node in my website and is causing a serious layout problem.
The problem is, I can't get rid of it. I can't see it in my files even when turning Invisibles on (duh). I can't seem to find it, no search tool seems to pick up on it. I rewrote my code around where it could be, but it seems to be somewhere deeper in one of the framework files.
How can I find characters by charcode across files or something like that? I'm open to different tools, but they have to work on Mac OS X.
You don't get the character in the editor, because you can't find it in text editors. #FEFF or #FFFE are so-called byte-order marks. They are a Microsoft invention to tell in a Unicode file, in which order multi-byte characters are stored.
To get rid of it, tell your editor to save the file either as ANSI/ISO-8859 or as Unicode without BOM. If your editor can't do so, you'll either have to switch editors (sadly) or use some kind of truncation tool like, e.g., a hex editor that allows you to see how the file really looks.
On googling, it seems, that TextWrangler has a "UTF-8, no BOM" mode. Otherwise, if you're comfortable with the terminal, you can use Vim:
:set nobomb
and save the file. Presto!
The characters are always the very first in a text file. Editors with support for the BOM will not, as I mentioned, show it to you at all.
If you are using Textmate and the problem is in a UTF-8 file:
Open the file
File > Re-open with encoding > ISO-8859-1 (Latin1)
You should be able to see and remove the first character in file
File > Save
File > Re-open with encoding > UTF8
File > Save
It works for me every time.
It's a byte-order mark. Under Mac OS X: open terminal window, go to your sources and type:
grep -rn $'\xFEFF' *
It will show you the line numbers and filenames containing BOM.
In Notepad++, there is an option to show all characters. From the top menu:
View -> Show Symbol -> Show All Characters
I'm not a Mac user, but my general advice would be: when all else fails, use a hex editor. Very useful in such cases.
See "Comparison of hex editors" in WikiPedia.
I know it is a little late to answer to this question, but I am adding how to change encoding in Visual Studio, hope it will be helpfull for someone who will be reading this sometime:
Go to File -> Save (your filename) as...
And in File Explorer window, select small arrow next to the Save button -> click Save with Encoding...
Click Yes (on Do you want to replace existing file dialog)
And finally select e.g. Unicode (UTF-8 without signature) - that removes BOM