Control sequences displayed when using git layer - spacemacs

When I do SPC g s, I get something that looks like
^[[1mdiff src/main.rs^[[m
Pretty much every line has some ^[[ escape sequence.
I'm running inside iterm on mac. I've tried searching, but I haven't found anyone with the same problem. It seems like its trying to bold the text, but it can't. I don't know if this problem is because of spacemacs or because of iterm.

The problem was not with spacemacs or iterm, but actually with git. For ~/.gitconfig, under color, change ui = always to ui = auto.

Related

Blue border started showing around cell after iOS 13 update, how to get rid off it?

I am going to try be precise about this problem.
I am fixing some old mail application written in objective c long time ago, and it worked pretty fine before this new iOS 13 update.
After that, it starts to show a blue border around body cell (where I have to type message).
I read about focus ring and it seems like same issue, but I was not quite sure because I did not see initialized it anywhere in my code.
Did anybody have a similar issue?
Thanks
It looks like this
I found an answer:
you need to implement these lines in your application:
[self.wkWebView stringByEvaluatingJavaScriptFromString:#"var style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = '*:focus{ outline:none }'; document.getElementsByTagName('head')[0].appendChild(style);"];

Show entire Sass-nesting-path/levels in the top?

I'm coding some colorschemes (in Sass), where one super-duper-parent-class, controls all the children. And I keep finding myself on screens such as this:
... thinking to myself: 'Now, which colorscheme am I in now?'.
I'm currently fixing it, by splitting the code into several files, which kinda solves it, but not in an ideal way. It means a lot of file-switching. And also if I have a .open- / .closed-class or a .missing- / .present-class, then I have to find that and 'climb down the tree' to ensure that I make the change in the correct spot. Quite tedious!
I was hoping that I could find a plugin, that could (at all times, regardless of where the cursor is), could display the nesting-levels in a fixed status-bar at the top of the screen ( kind of like that I can position my cursor on a bracket to see the matching one ).
An example of what I'm trying to find is, if I put the cursor inside ul.menu-main__current-menu-item__missing li a {, that it then would show a status-bar in the top:
#header >> &.green-colorscheme >> ul.menu-main__current-menu-item__missing li a
Can I achieve this, somehow? If not, - then how do I stop getting lost in my code?
Attempts
Looked into bookmarks.
Looked into code folding.
I'm trying Rainbow Brackets at the moment.
None of which solves the issue as well as my suggestion.
IDE can already do this for Sass/SCSS (since 2018.1 or so, I do not remember exact version number; could do that for HTML/PHP for a long time).
Make sure that you enabled Breadcrumbs for Sass language at Settings (Preferences on macOS) | Editor | General | Breadcrumbs

Visual Studio Code Formatting fail on save

I've started learning React Native.
I'm using Visual Studio Code as my editor.
I've set up the boiler plate and started the app. But whenever I change a .js file and hit save, VSCode is messing up all the formatting.
I thought I could sort this in the settings.json file but after googling for a while and playing around I can't find the correct setting.
Is this a bug or am I doing something wrong?
Setting file is default one:
UPDATE: I re-installed vscode. Then set up a basic js file with a react native tag and a html tag. I added in:
"editor.formatOnSave": false,
"javascript.format.enable": false
To my settings.json file and the problem still occurs:
The problem is having tags in a js file, I just don't know how to tell vscode to ignore them?
I found out what this was by looking though the extensions. Thanks to #wgj for the hint.
Turns out it was the JS-CSS-HTML formatter. I looked through the instructions and have removed the auto save for now. I'll have to work out the specific settings for this.
It uses js-beautify so if anyone knows the settings I should be looking at would be much appreciated.
I had a similar problem and it turned out my ultimate culprit was...
So I simply disabled it for the workspace.
Same here, all my HTML format messed up after saving, I disable "JS-CSS-HTML Formatter" and problem solved
In the end, what did the trick was changing the file format from JavaScript to JavaScript React on the bottom toolbar.
All my HTML format messed up in js after saving, I disable "JS-CSS-HTML Formatter" and restarted vscode, problem solved.
I found my solution to this problem by converting my components file extension from js to jsx. No more issues and everything is working fine.
Disable js-css-html formatter.
if you are using prettier and beautify together, override the setting as :
"beautify.ignore": [
"**/*.js",
"**/*.jsx"
]
Use Prettier Code Formatter instead of Beautify. Works perfectly for language mode Babel JavaScript
You should search for "format" in settings.json. You'll find a whole lot of TypeScript/JavaScript formatting tweaks in there, but the one that stands out to me is:
// Defines space handling after opening and before closing non empty brackets.
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false
Alternative, you're not a fan of formatting at all, you can turn it off entirely:
// Enable/disable default JavaScript formatter.
"javascript.format.enable": true,
However, a lot of my formatting options come from language server extensions, so if you're using one for React Native specifically, be sure to check the attributes in settings.json, or the docs to see if there are any attributes you can add.
Add this on settings.json file. Whether you are using any extension or not, use this code. It works fine for me:
Solution 1: Just Disable JS-CSS-HTML Formatter
Solution 2: Press Ctrl+, (open settings) after that search Code formatted and change none --> Prettier
If you don't have prettier install from the extension's marketplace.
i just had this problem , apparently its because of the beautify/prettier , try to disable both , then restart Vs code (your editor) . but then if u really want to use prettier , go under its extension settings and make sure its in strict with whitespaces and toogle around a few other settings and you should be fine , cheers .
Just turning off format on save option from the settings would work.
You can select JavaScript React in the task bar under Select Language Mode.
You can try one of the following
uninstall other formatters which are not required. To check how many formatters you have just press ctrl + shift + p or command +shift + p (mac) and type format document after that a menu will appear showing you your formatters
press ctrl + shift + p or command +shift + p (mac) and type settings and click on open users settings and then search for format on save and check the box
that's it!!
Enjoy
changing the file format from JavaScript to JavaScript React on the bottom toolbar worked just fine for me
I have tried all methods but the problem is solved completely by this:
-> Open setting.json
-> "files.associations": {
"*.js": "javascriptreact"
}
->Add above lines and press save the problem will solve
You can type the following command string when creating your project
npx create-react-app name-of-app react-complete-guide
or the following, if you have create-react-app installed already
create-react-app name-of-app react-complete-guide

IntelliJ output console INFO colour

Does anyone know why IntelliJ is printing all log messages to my console in red coloured text? This make it really hard to distinguish between info and trace messages and the actual error messages that I need to see!
I'm using Tomee and CDI if this is relevant!
Thanks for your assistance,
Edit
My setting all look okay within the preferences window:
I have stacked with the same problem too. For now I'm using Intellij IDEA 2016.1 and there are no such opportunity to color logs the way you want.
For me I have solved it by using Grep Console Plugin and recommend it to you.
It's easy to install and use.
Before
After
I had exactly same problem. Not sure about your case, but mine was following:
I use SLF4j Simple Logger Facade in my projects (because it is simple, yup). So it turned out that if you don't specify org.slf4j.simpleLogger.logFile property in simplelogger.properties file located in your resources folder (as well as if you don't have that file at all), the logger output defaults to System.err which is red in Idea.
The solution proposed by #pavlo sort of helped, but the base colour was still red.
So I added this line to src/java/main/resources/simplelogger.properties:
org.slf4j.simpleLogger.logFile=System.out
and installed Grep Console Plugin. Together they perfectly solve the problem with SLF4j Simple Logger.
I found that if I map the Console Colors for Bad command or filename to my preferred Logger.INFO color, it works fine.
This is an issue that needs fixing, for for now this workaround works for me.
This can also be solved by adding the following VM option to your run configuration.
-Dorg.slf4j.simpleLogger.logFile=System.out

cefpython3 (cefwx example2) iCCP: known incorrect sRGB profile

How do i fix or ignore this warning popup? The example works fine, but this warning popup keeps showing. I looked around for a solution and image magic seems to be the fix. However, there are no images causing this problem in the sample code. I'm assuming it is what is being loaded by the browser. Can someone help me solve this problem please?
I can confirm this issue with wx.version=3.0.2.0 msw (classic) and cefpython 31.2. The navigation bar in this example loads three buttons (back, forward, reload) from this directory: c:\Python27\Lib\site-packages\cefpython3\wx\images:
Arrow Left.png
Arrow Right.png
Button Load.png
These cause the "iCCP: known incorrect sRGB profile" error.
Solution: In the c:\Python27\Lib\site-packages\cefpython3\examples\wx\ directory there are three images (back.png, forward.png, reload_page.png). Replace the problematic images with these by renaming them (back.png to Arrow Left.png etc) and copying to the c:\Python27\Lib\site-packages\cefpython3\wx\images directory.
Created Issue #221 to fix this.
If using wx 2.9/3.x you might also encounter text input issue. The cefpython 31.2 release was tested with wx 2.8 only.