I upgraded version 2 > 3 and it now appears to be icons in the sidebar the left of each file/folder (and to the right of corresponding arrow).
I find these icons cluttering, is there anyway to hide them?
One way to achieve this is through theming.
If you would like to edit your default theme to remove the folder/file icons, you must install PackageResourceViewer.
Then you can use Sublime's command palette to execute PackageResourceViewer:Open Resource.
Click Theme - Default followed by Default.sublime-theme
Find and edit the section of the theme which handles folder/file icons to match this sample:
{
"class": "icon_file_type",
"content_margin": [0,0]
},
{
"class": "icon_folder",
"content_margin": [0,0]
},
{
"class": "icon_folder_loading",
"content_margin": [0,0]
}
Source
If you don't want to change your install, you can also customize your theme in your personnal folder.
For example, under Ubuntu, edit or create this file ~/.config/sublime-text-3/Packages/User/Default.sublime-theme, and add following settings into it:
[
{
"class": "icon_file_type",
"content_margin": [0,0]
},
{
"class": "icon_folder",
"content_margin": [0,0]
},
{
"class": "icon_folder_loading",
"content_margin": [0,0]
}
]
(in every settings file, settings are inside an array)
By default, the Packages directories for Sublime Text 3 are located at:
OS X: ~/Library/Application Support/Sublime Text 3/Packages/
Windows: %APPDATA%/Roaming/Sublime Text 3/Packages/
Linux: ~/.config/sublime-text-3/Packages/
The path is different for sublime 4 on my windows10 x64: C:\apps\sublime_text_build_4113_x64\Data\Packages\User\Default.sublime-theme
And I only want to hide icons before the files and keep the icons of the folders. So my Default.sublime-theme ends up with the following content.
[
{
"class": "icon_file_type",
"content_margin": [0,0]
}
]
Related
Duplicate: I asked this on SuperUser without answer
Using:
editor: VS Code
terminal: Git Bash
VS Code offers a shortcut Ctrl+Shift+C to open it externally and a shortcut Ctrl+` (or in my case Ctrl+F1) to open it internally.
In my case it opens it externally with both shortcuts as well as with menu View->Terminal.
I turned Google upside down to the best of my knowledge to find this solution.
I have reinstalled Git from git-scm.com.
I checked my VS Code settings (Code\User\settings.json) to find a clue, if I accidentally set to force external opening myself.
I know I shouldn't paste an entire file, but maybe you find where the problem in settings.json lies:
{
// Chosen Terminal
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
// Prevent losing aliases, colorization etc. for the Git bash terminal
// "terminal.integrated.shellArgs.windows": [
// "--login",
// "--init-file",
// "C:\\Program Files\\Git\\etc\\profile"
// ],
// Windows Terminal
"terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe",
// Chosen Theme Color and Color Customization
"workbench.colorTheme": "Monokai",
"workbench.colorCustomizations": {
"[Monokai]": {
// "statusBar.background": "#666666",
// "panel.background": "#555555",
// "sideBar.background": "#444444",
"tab.activeBackground": "#999999",
"tab.activeForeground": "#333333"
}
},
// Emmet Customization
"emmet.triggerExpansionOnTab": true,
// Editor Customization
"editor.fontSize": 14,
"editor.wordWrap": "on",
"editor.codeActionsOnSave": {},
"editor.tabSize": 2,
// PHP Tooltip Suggestions
"php.suggest.basic": false,
"php.validate.executablePath": "C:\\xampp\\php\\php.exe", //for linting
"php.validate.run": "onSave", //change to onType if need be
"explorer.confirmDelete": false,
"beautify.language": {
"js": {
"type": [
"javascript",
"json",
"jsonc"/*,
"html"*/
],
"filename": [
".jshintrc",
".jsbeautifyrc"
]
},
"css": [
"css",
"scss"
],
"html": [
"htm",
"html"
]
},
"beautify.config": {
"indent_size": 2,
"indent_char": " ",
"css": {
"indent_size": 2
}
},
// Git costumization
"window.zoomLevel": 0,
"workbench.colorCustomizations": {
"gitDecoration.addedResourceForeground": "#f45342",
"gitDecoration.modifiedResourceForeground": "#3888d8"
},
"workbench.settings.useSplitJSON": true,
"files.trimTrailingWhitespace": true,
"minify.minifyExistingOnSave": true
}
If I use Ctrl+Shift+C shortcut, let's say on two different projects, it opens two external terminals just as one would expect.
If I use Ctrl+F1 (default Ctrl+`) shortcut it wants to open them internally so bottom part of VS Code windows looks like this:
And it still opens them externally:
Can anyone provide some insight?
It seems adding "terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe" to Settings is the old way and doesn't work as expected.
Delete all lines related to bash from Settings JSON (check User, Workspace and Folder Settings to be sure) and save the file.
Then just open Command Palette (Ctrl + Shift + P) and type in
Select Default Shell
and choose bash from there.
Now all you have to do is restart VS Code and terminal will be running as expected.
For shells that aren't in your %PATH%, see the other answers.
See the complete Visual Studio Code shell reference.
There should be pre existing Terminal profiles already configured so it should be as simple as adding:
"terminal.integrated.defaultProfile.windows": "Git Bash",
to your settings.json
I try get tabs of current brouser window
var tabs = require("sdk/tabs");
and catch all new tabs
tabs.on('load', function(tab) {
console.info( tab.url );
});
if I run firefox by jpm run, all work fine. But if I build the xpi and install it to firefox then I'm getting tabs by other empty windows (if I call tabs.open opening new windows)
How fix it?
Now I'm trying the following simple example:
var buttons = require('sdk/ui/button/action');
var tabs = require("sdk/tabs");
var button = buttons.ActionButton({
id: "mozilla-link",
label: "Visit Mozilla",
icon: {
"16": "./icon-16.png",
"32": "./icon-32.png",
"64": "./icon-64.png"
},
onClick: handleClick
});
function handleClick(state) {
tabs.open("http://www.mozilla.org/");
}
And this example works only if I run "jpm run".
if I build the extension and simple run the firefox (with the addon), the button do not created.
I'm thinking that your xpi can not locate the icons, so your plugin seems not working.
The icons should be in your ./data directory and furthermore in your package.json it is a good practice to specify your main. The file hierarchy of your working extension is:
├--data/
├-- icon-16.png
├-- icon-32.png
├-- icon-64.png
├--lib/
├-- main.js
├--package.json
The package.json looks like:
{
"name": "stackexample",
"title": "stackexample",
"id": "mail#mail.com",
"description": "An stackoverflow example",
"author": "mail#mail.com",
"main": "./lib/main.js",
"version": "0.0.1"
}
In firefox after 'ready' event has been emitted, all properties relating to the tab's content can be used.You cannot access tab's properties on load event.
Please refer to this link of addon sdk tabs ready event
I found answer
If set setting history
"Never remember history" i got the problem
if set
"Remember history" problem has gone
it's very strange, i know
SublimeText has a project-settings file that includes a folder_include_patterns option.
I have a folder called (my app name).project-settings (which according to some research, is the correct name for the file) in the top level of my project. I am trying to make Sublime not show all the files under node_modules except my-module:
{
"folders": [
{
"path": "node_modules",
"folder_include_patterns": [
"my-module"
]
}
]
}
However SublimeText still shows all the files under node_modules. How can I make a Sublime Text project file to only show certain folders?
I assume you don't want to ignore all the other modules in node_modules.
You could ignore your node_modules directory and include your module as another folder.
{
"folders":
[
{
"folder_exclude_patterns":
[
"node_modules",
],
"path": "."
},
{
"path": "node_modules/mymodule"
},
]
}
My syntax is correct, but making the file isn't enough to make a dir into a project.
Since there is no 'new project' button in Sublime, you can make a folder with:
Open the folder in Sublime.
Click Project > Save Project As
This makes:
your_project.sublime-project
{
"folders": [
{
"path": "."
},
{
"path": "node_modules",
"folder_include_patterns": [
"my-module"
]
}
]
}
your_project.sublime-workspace (left as defaults)
Additionally: you must open the project from the Project menu (otherwise it will still be a folder and ignore the .sublime-project file).
I'm trying to use CSSLint with Sublime Text 3, but I can't seem to get it to use the .csslintrc file I've got in my project root.
Originally I thought it would be in JSON format, but then it turned out you have to use a command line syntax, so as a test I tried these in my .csslintrc file:
--ignore=ids,important
and
ignore=ids,important
But neither stop the linter from warning about the use of either??? Any suggestions? It does work if I just stick it in the user settings file, but since I use .jshintrc and other files in my projects for linting etc, and not everyone uses Sublime Text (I don't know why they wouldn't :), I'd prefer to have it all in .csslintrc
"linters": {
"csslint": {
"#disable": false,
"args": [],
"errors": "",
"excludes": [],
"ignore": "ids,important", // WORKS
"warnings": ""
},
}
First solution, you can add a .csslintrc file in the CSS folder (and duplicate it for each sub folder...) :
--ignore=ids,important
Otherwise, you can add a .sublimelinterrc file in your project root :
{
"linters": {
"csslint": {
"ignore": ["ids, important"]
}
}
}
When using SublimeLinter-scss-lint with my SASS files it throughs up errors for common things like,
indentation should be 2 spaces not 4 spaces, colan after property should be followed by one space etc etc.....how can get sublime to ignore these and just watch out for more important errors??
You can disable or configure each linter component of the scss linter plugin for Sublime Text 3. You just need to configure the user settings.
Go to:
Sublime Text Menu
-> Preferences
-> Package Settings
-> SublimeLinter
-> Settings - User
By default, this file is stored at the path below, but may not exist if you haven't configured any settings yet.
~/Library/Application Support/Sublime Text 3/Packages/User/SublimeLinter.sublime-settings
The basic structure of this file, in terms of linter plugins, is shown below and will vary based on what you have set and what plugins you are already using. (I have removed most of the other settings to focus on what is important for configuring the scss plugin.)
{
"user": {
... more settings ...
"linters": {
"csslint": {
...
},
"htmltidy": {
...
},
"jshint": {
...
},
"json": {
...
},
"php": {
...
},
"scss": {
"#disable": false,
"args": [],
"exclude-linter": "Indentation SpaceAfterPropertyColon",
"excludes": [],
"include-linter": ""
},
"xmllint": {
...
}
},
... more settings ...
}
}
The important bit that you want is under the "linters" -> "scss" section. You can explicitly list linters in the scss plugin to include or exclude.
Full list of default SCSS linters
As the configuration is set up above, it should disable both the Indentation and SpaceAfterPropertyColon linters for scss. You can add as many as you want to this list.
SublimeLinter documentation for the settings file