Autocomplete Brackets - Zerobrane - zerobrane

Does Zerobrane have an autocomplete-function for brackets?
I dont like it to always do the close-bracket and I found nothing on the Internet

There is autodelimiter plugin that does auto-insertion of delimiters (), {}, [], '', and "".

Related

Prevent VSCode Turn Vuejs code to vertically when onsave

My VSCode onSave
... turns my Vuejs codes vertically somehow to so many lines.
I know that it is easier to read, but I also find it very long to read, and it makes my file too long and I had to scroll down for no reason.
Is this sth that caused by Prettier?
Can someone pls show me how to prevent it from happening?
settings.json
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
},
Prettier formats lines to fit within the character limit of printWidth (default is 80 characters).
Set printWidth to a high value to avoid this line wrapping:
// .prettierrc
{
"printWidth": 300
}
Yes Prettier format the code like this because it's easier to read it. If you want to disable this, just change to false the editor.formatOnSave

cx-icon with custom icon types gives an error when 'strictTemplates' is set to 'true'

In our project, we realised we cannot use <cx-icon> in our templates if strictTemplates is set to true without using $any(...), from Angular, as a workaround.
We have our own list of CUSTOM_ICON_TYPE's, so after we set strictTemplates to true, Angular complained about our own icon types. This code:
<cx-icon [type]="customIconTypes.CHEVRON_RIGHT"></cx-icon>
gives this error:
Type 'CUSTOM_ICON_TYPE.CHEVRON_RIGHT' is not assignable to type 'ICON_TYPE'. ngtsc(2322)
Here is an example of our current workaround:
<cx-icon [type]="$any(customIconTypes.CHEVRON_RIGHT)"></cx-icon>
Is there any other known workaround for that? Or is an update on cx-icon already planned in the future?
According to the docs the configuration of the icons was designed to be provided for in a different way.
Please try this:
ConfigModule.withConfig(<IconConfig>{
icon: {
symbols: {
CHEVRON_RIGHT: "<value of customIconTypes.CHEVRON_RIGHT>",
},
},
});

yadcf>filter_type: “text”>filters_position: 'footer' fails to search

I'm having issue when search text box are in the footer position. The search box is not functional when setting filters_position: 'footer' to yadcf. When setting is removed the text search box do there thing. Anything else I need to do? Thanks in advance and Awesome plug-in.
https://jsfiddle.net/4hqm9tsh/2/
Setting scrollX: to false I'm now able to search with in the column. I'm hoping to keep this true.
{
column_number: 6,
filter_default_label: "",
filter_type: "text",
style_class: 'yadcf-sb',
filter_delay: 1000,
filter_reset_button_text: false
},
],
{ filters_position: 'footer' }
It was a bug in yadcf which I just fixed and released in new 0.9.3.beta.8,
see it in action here
If you will encounter this in other filter type please open a bug in yadcf repository.
It seems that specifying scrollY in the DataTables settings is causing the footer not to filter anything. Needs fixing.

How do I beautify in Sublime Text 2

In Sublime 2, I know how to reindent the whole document and how to assign a key to this function, but I want to reindent as is do in WebStorm where spaces are added before and after a (=) or after and before a (:). Watch the image for the examples. How could I do that in Sublime or what package do this?
Use:
HTML-CSS-JS Prettify
You can adjust the following settings #:
Menu > Preferences > Package Settings > HTML/CSS/JS Prettify > Set Prettify Preferences
"js": {
"allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
"brace_style": "collapse-preserve-inline",
// collapse: (old default) Put braces on the same line as control statements
// collapse-preserve-inline: (new default) Same as collapse but better support for ES6 destructuring and other features. https: //github.com/victorporof/Sublime-HTMLPrettify/issues/231
// expand: Put braces on own line (Allman / ANSI style)
// end-expand: Put end braces on own line
// none: Keep them where they are
"break_chained_methods": false, // Break chained method calls across subsequent lines
"e4x": false, // Pass E4X xml literals through untouched
"end_with_newline": false, // End output with newline
"indent_char": " ", // Indentation character
"indent_level": 0, // Initial indentation level
"indent_size": 2, // Indentation size
"indent_with_tabs": true, // Indent with tabs, overrides `indent_size` and `indent_char`
"jslint_happy": false, // If true, then jslint-stricter mode is enforced
"keep_array_indentation": false, // Preserve array indentation
"keep_function_indentation": false, // Preserve function indentation
"max_preserve_newlines": 0, // Maximum number of line breaks to be preserved in one chunk (0 disables)
"preserve_newlines": true, // Whether existing line breaks should be preserved
"space_after_anon_function": false, // Should the space before an anonymous function's parens be added, "function()" vs "function ()"
"space_before_conditional": true, // Should the space before conditional statement be added, "if(true)" vs "if (true)"
"space_in_empty_paren": false, // Add padding spaces within empty paren, "f()" vs "f( )"
"space_in_paren": false, // Add padding spaces within paren, ie. f( a, b )
"unescape_strings": false, // Should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65"
"wrap_line_length": 0 // Lines should wrap at next opportunity after this number of characters (0 disables)
}
Note:
It does not handle commas within quotes.
I also tested CoolFormat, which does not handle them either.
You should check out Will Bond's Alignment plugin, it should do most of what you want, and is pretty configurable as well. There seems to be an issue with the documentation and circular links between packagecontrol.io and wbond.net, but here is the documentation stored in the Wayback Machine.

Edit hover in rallygrid missing

Trying to do some cell validation in a rallygrid, but in order to add it I need to use objects in columnCfg instead of just file names. I have something like
{
dataIndex: 'field1',
text: 'field1',
editor: { xtype: 'rallynumberfield', allowBlank: true , allowDecimals: false},
editable: true,
},
Everything works (and I'll add a renderer when it does) but I don't get the little edit hover (pencil icon) on this column. Any hint where to look? My goal is for it to look like a default grid with just the renderer, but as soon as I use the options opbject instead of a string, the hover goes away. Any hints?
Thanks for reporting this - I'm seeing the same issue (i.e. cells in column are editable, but the "pencil hover is missing). This looks like an oversight in the rendering of the component in AppSDK2. I'll file a Defect with Rally Engineering. Sorry for the inconvenience.