Sublime Text How to Customize Reindent? - sublimetext2

Is there any option to change the setting of 'reindent', the default package doesn't give much information regarding reindent customization?
I'd like to format the following block
.example{asd:qweweq; qwrqr:afakr;}
into
.example {
asd : qweweq;
qwrqr : afakr;
}
What should I do?

Alignment seems to do part of what you're looking for.

Related

Removing tick line in recharts react

i'm trying to remove the light gray line that's next to the darker gray line:
After searching the rechart library through and through i decided to try and hide it with a css file.
this is the code :
.recharts-layer.recharts-cartesian-axis-tick line{
display: hidden;
}
I've also tried :
.recharts-cartesian-axis-tick-line{
display:hidden !important;
}
and still doesn't work.
it's important to note that the css file is linked and when trying to style something else it works.
this is what i see when i inspect and pick the element in the dev tools :
any help will be appreciated!
What you need to do is remove the tickLine from YAxis.
Something like that:
<LineChart>
...
<YAxis tickLine={false} />
...
</LineChart>
You can check more about it in docs API.

How to have a helper text over the input field in html?

I have the following design:
UI Design
I want an input field like this i.e. having a text like Shipper Name or Contact Number on top of the input field. How can I achieve this in HTML ? I am not able to find it on the internet.
Thank you
you can use material-ui to access these kind of components without having to code it from scratch.
Their TextField looks exactly the same in the image you provided:
https://mui.com/material-ui/react-text-field/
Their documentation you can follow to integrate their library on your project:
https://mui.com/material-ui/getting-started/installation/
Use fieldset and legend
<fieldset><legend>Shipper Name</legend><input type="text"></fieldset>

How to add disabled attribute to input tag with ngTagsInput?

I have a custom directive that I use to manage user access through my website. I use this to add a 'disabled="disabled"' attribute to html tags.
However, when I try to use this with tag-input, it doesn't work. I'm guess this is down to that fact that ngTagsInput uses it's own directive for tags-input.
I have read the documentation and cannot find a solution to what I am looking for.
Here is my code:
Html:
<div access-level="Admin">
<tags-input ng-model="tags" on-tag-added="addNewTag($tag)" on-tag-removed="removeTag($tag)">
<auto-complete source="loadTags($query)" min-length="0"></auto-complete>
</tags-input>
</div>
Is there any work around for this?
Thanks.
It's currently unsupported, but looks like will be in the next major version (2.3.0):
https://github.com/mbenford/ngTagsInput/issues/102
Edit:
2.3.0 is out; see following link for details https://github.com/mbenford/ngTagsInput/blob/master/CHANGELOG.md#features
I could not find this option in the release 2.3.0, but at least they have enabled the regular disabled attribute.
What I have done to hide the remove button and the "Add a tag" input box, was to add a couple of rules in the CSS.
tags-input[disabled] .remove-button {
display: none;
}
tags-input[disabled] input.input {
display: none;
}
Probably there is a better way to do it, this was the fastest I could find.

How do I disable Emmet's CSS Abbreviations in Sublime Text 2

I really like how Emmet generates HTML based on 'CSS-like' strings but I don't want to use their CSS Abbreviations. Cause when I write a piece of css as follows:
li a|
And I press 'TAB', I want to get a Tab
li a |
But with Emmet I get the following when I press Tab
li |-webkit-appearance: none;
-moz-appearance: none;
appearance: none
How can I disable this functionality of Emmet?
In Emmet.sublime-settings you have to update disable_tab_abbreviations_for_scopes property: add source.css to disable Tab trigger completely in CSS.
Also, if you’re on ST2, you may want to take a look at disable_tab_abbreviations_for_regexp preference due to some bugs in ST2 scope matcher.
If you installed with package control, search for Package Control: Remove Package in the command palette. Otherwise you can just remove the Emmet directory.
If you wish to use a custom caption to access commands, create Default.sublime-commands in your User folder. Then insert something similar to the following.
[
{
"caption": "Package Control: Uninstall Package",
"command": "remove_package"
}
]
Of course, you can customize the command and caption as you see fit.
Or try like this: CTRL + SHIFT + P >> Remove Package >>
Select package to remove then press enter
Instead of pressing Tab, you can use Shift+Tab to insert a tab without triggering the tab trigger.
It’s documented in the Sublime Text documentation.
Preferences.sublime-settings - toggle on/off is there.

Sublime Text 2 - How to change the font size of the output panel?

When I change the font size in Sublime Text 2 (via shortcuts / config), the font size of text in output panel AKA Build Results is changed too.
It would be convenient to have these font sizes separated. I tried to follow & adapt Sublime Text 2 how to change the font size of the file sidebar? and edited <theme name>.sublime-theme:
{
"class": "output.exec",
//"class": "output",
//"class": "output_exec",
//"class": "exec",
//"parents": [{"class": "output"}],
"font.size": 7.0
},
Output panel is named output.exec, but it doesn't work. Some other options I tried are commented out.
Probably I just need correct class name. I'm unable to find class list which are used in ST2.
Is it possible and if yes - how to change the font size?
EDIT:
It's already on wishlist: http://sublimetext.userecho.com/topic/27388-set-font-size-per-pane/
Yes you can, this will however change the font-size for the console panel as well, so if that doesn't bother you then simply do this:
First create a file named Widget.sublime-settings under the Packages\User directory.
Second write the following in that file:
{
"font_size": 7
}
Now you're good to go!