Brackets Emmet Custom Snippet Configuration Issue - configuration

Here are the steps I took:
1. Install emmet via extensions manager
2. Click Emmet menu > preferences
3. Enter path for extensions. (Tried both custom and actual brackets extensions folder)
4. Add a snippets.json file to the specified folder in step #3.
{
"variables": {
"lang": "en",
"locale": "en-US",
"charset": "UTF-8",
"indentation": "\t",
"newline": "\n"
},
"txt": {
"filters": "txt",
"profile": "txt",
"abbreviations": {
"#i": "#import url(|);"
}
}
I am editing a txt file and it is not working when I press #i<tab> or Meta+E, what am I missing?

Related

VS Code API extension development - configuration points issue

This is from package.json file:
"configuration": [
{
"id": "projectmanager",
"title": "Enable or Disable project manager",
"order": 1,
"properties": {
"AIO.projectmanager": {
"type": "boolean",
"order": 1,
"description": "Enabled - true, Disabled - false : for Project manager."
}
}
}
When I debug and run it, the setting does not show up in a GUI nor in the settings.json of the extension development host.
Any way to fix this?
Edit: When i run the extension, it sends a notification saying "[my:\extension\workspace]: property engines is mandatory and must be of type object "

How to fix "/bin/bash: [command] command not found" after setting up tasks.json and c_cpp_properties.json for C++ on Windows 10 VS Code?

I have configured my task.json and c_cpp_properties.json so that I may compile my main.cpp program. In order to proceed, I must press
Ctrl + Shift + B
As soon as I do a terminal pops up and alters me of an error:
Executing task in folder C++: C:\MinGW\bin\g++.exe -g main.cpp -o c:\Users\Me\Desktop\C++\.vscode\tasks.exe <
/bin/bash: C:MinGWbing++.exe: command not found
The terminal process terminated with exit code: 127
Terminal will be reused by tasks, press any key to close it.
I don't why this is happening since I've already checked that MinGW is installed in my computer with the correct PATH. To ensure that I do I typed the following in the terminal:
g++ --version
g++ (MinGW.org GCC-8.2.0-3) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
I also checked the path according to this figure
The only closest problem related to mine is in this Github link. I've also already tried changing the file directory shown in the code below using this thread but I still encounter this error.
Here are my JSON files which are inside my .vscode file:
tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-g",
"main.cpp",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
c_cpp_properties.json:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.17134.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"${workspaceRoot}",
"C:\\MinGW\\lib\\gcc\\mingw32\\8.2.0\\include\\c++"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 4
}
I should expect to see a ".exe" after compiling but I can't due to the error.
After spending two days messing around with this I've finally able to correct setup C++ on VS Code and resolved the error.
According to the png image from above, I've included "C:\MinGW\bin" within the user variable "Path" under the dialogue box "User variables for Me". After a simple restart on my computer, I was able to build my project (Shift + Ctrl + B) with no problems.

How to Debug other project than "main"?

Using Visual Studio Code, I have two directories in my workspace (both node.js projects), but I can only launch one of them. The launch.json file exists in both folders, but only the first is available in debug menu. The launch.json files looks like that:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}\\app.js",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}
How can I start debugging the second folder of my workspace?
I removed the first folder from the workspace, started the only project left, then added the removed folder again. Now I have both projects in the launch configurations.
I have found two solutions. Both involve editing your *.code-workspace file.
As OP found, you can reorder the folders. In the *.code-workspace file, place the folder with the desired launch.json at the top of the list of folders.
"folders": [
{
"path": "..\\ProjectWithLaunchJson"
},
{
"path": "..\\MyOtherProject"
}
]
Alternatively, you can include the launch configuration in the *.code-workspace file.
"folders": [
:
:
],
"settings": {
"launch": {
"configurations": [
{
<copy your launch.json's configuration into here>
}
]
}
}
YMMV. I had to tweak the path to the executable. And I had to remove the preLaunchTask property since VS Code could not find the Task. VS Code's support for this will likely evolve.

Error loading extension

I got this extension for google chrome and it won't load when I try to load unpacked extension. Where is the problem?
{
"manifest_version": 2,
"name": "HTML",
"description": "HTML change",
"version": "1",
"background": {
"page": "background.html"
},
"content_scripts": [
{
"matches": ["https://ocjene.skole.hr/pocetna/prijava/*"],
}
],
}
Trailing commas mean invalid json - try this change first:
{
"manifest_version": 2,
"name": "HTML",
"description": "HTML change",
"version": "1",
"background": {
"page": "background.html"
},
"content_scripts": [
{
"matches": ["https://ocjene.skole.hr/pocetna/prijava/*"]
}
]
}
You may refer with this Can't load unpacked extension? forum.
I'm going to recommend that you start with a powerwash. This will wipe your device and return it to factory settings (and also put you back to the stable channel). Full instructions can be found in this help center article.
After the powerwash, I would suggest that you test whether or not the extension will load while still running a stable build. If it does, and then it stops working when you switch o the dev channel, that helps to narrow down the issue.
Additional references:
Load Unpacked Extension
Unable to load unpacked extensions

How to designate Article Directory when publishing to Apple News using Terminal?

I have an article.json file (named as such) below that I want to connect to Apple News and test:
{
"version": "1.4",
"identifier": "TestArticle",
"title": "My First Article",
"language": "en",
"layout": { "columns": 1},
"components": [
{
"role": "title",
"text": "My First Article"
},
{
"role": "body",
"text": "This is just over the minimum amount of JSON required to create a valid article in Apple News Format. If you were to delete the dictionary enclosing this text, you'd be there."
}
],
"componentTextStyles": {
"fontName": "Lato",
"textColor": "#000",
"linkStyle": {
"highlight": {
"color": "#358fd4"
}
}
}
I downloaded XCode and the necessary Ruby gems, to enter relevant command lines. As specified in the documentation, my .papi file is formatted correctly as it fetched my channel information successfully. According to Apple's ReadMe, this is the command I have to enter to publish an article:
papi-client article publish <Article Directory>
The problem is, I'm not sure exactly what this article directory is, or how to locate it. As far as I knew, I would create something like the above "article.json" file and potentially use that as the directory. I've even tried using the file path for said file, with no success. What could be my next steps to get this off the ground?
Place the article along with any locally linked, i.e. bundle://, content in a folder then use this folder as the article directory.