WebStorm wrapper text with square brackets - ide

When I select some text, for example form-col and press [ I want to get [form-col] but WebStorm replace selected text with [. Is there a way to configure it?

I don't think that functionality exist. However you can use the Live template functionality. It's very useful and it does pretty much the same thing.
To do this, go on : [File]->[Settings]->[Editor]->[Live Templates]->user, Click button + and add a live template like:
In you html file when you write the abbreviation what you are added, press Tab and it generate you [] and place the cursor after the first [and now you can write your html tag [form-col]

Settings/Preferences
Editor | General | Smart Keys
Ensure that Surround selection on typing quote or brace option is enabled

Related

Make VS code stop adding and inserting characters

VS code likes thinking for me, which is the number 1 sin a text editor can
do. To "help" it will auto type [] and {}, when deleting it will also delete [] instead of just ]. When typing HTML it also tries to auto add </div> at the wrong time...
99% of the time when it adds a character I didn't add myself it creates issues. How can I turn that feature off? i.e if I didn't explicitly press a key to modify a character, VS code has no business touching that character.
Open the Settings menu (Ctrl , on Windows or File -> Preferences -> Settings).
Select Text Editor.
You can selectively disable Auto Closing Brackets, Auto Closing Quotes, and other editor options.

Intellij: how to convert indents for all files

I know how to convert indent for a single file. I go to edit -> convert indent -> space/tab.
But I want to do this for all files under a directory.
I try click on a directory and then go to edit -> convert indent, but the options are grayed out.
You can use the shortcut Ctrl+ALT+L (Windows/Linux) or ⌥⌘+L (MAC OS X) and select the Rearrange entries option to reformat the code in the current file or reformat a module or directory.
You can also Right-click a module, file, or directory from the context menu and select Reformat Code and also select the Rearrange entries option.
This will convert the indents for all files/directories selected:
This works on most of the Jetbrains IDES (iDea, PyCharm, WebStorm, RubyMine, and so on.)
It seems there is no such dedicated option in IntelliJ, but you could just work around it using a "low-level" Replace All action.
Open the Edit → Find → Replace in Files... dialog
In case you want to convert spaces to tabs, you should
Enter in the Find field (i.e. four spaces (or whatever number of spaces the project is currently indented with))
Press the Regex search modifier (Alt + X)
Enter \t in the Replace field
NB: In case you have valid strings with 4+ spaces in them, they will get replaced too. In most use cases, however, this is not happening.
In case you want to convert tabs to spaces, you should do the same as above, but swap the Find and Replace field contents
NB: Again, if you have valid strings with tabs in them, they will get replaced too. I haven't had this use case, because I've only needed to convert in the opposite direction.
You will probably also want to set a File mask in order not to replace spaces in code-irrelevant files

Intellij - Reformat Code - Insert whitespace between // and the comment-text?

I am working with another human being on project from that the professor expects to have uniform code-style. We have written large separate junks of code on our own, in which one has written single line comments without a white-space between the single-line-comment-token and the other one has inserted a white-space. We are working with IntelliJ and have failed to find an option to enable the Reformat Code function, to insert a white-space.
TLDR:
Can you tell us how to convert comments from that to this in IntelliJ?
// This is a load bearing comment - don't dare to remove it
//This is a load bearing comment - don't dare to remove it!
You can do a global search and replace (ctrl-shift-r on windows with default keyboard layout, or Replace in Path under the Edit/Find menu).
Check the regular expression option and enter //(\S.*) as the text to find and // $1 as the replacement. Check the whole project option, and clear any file masks. You can single step through the replacements, or simply hit the All Files option.

How do I display brackets around assumptions in Isabelle/jEdit?

When goals are displayed by Isabelle in ProofGeneral, assumptions are rendered as having brackets around them as so:
In Isabelle/jEdit, however, this seems to have changed to meta-implication arrows:
While I understand the former is somewhat non-standard, I find it much easier to read. Is there a way to modify the behaviour of Isabelle/jEdit to print out goals in the old ProofGeneral style?
The format Isabelle renders its output is determined by Isabelle's "print modes". In ProofGeneral, the default print_mode includes the brackets mode, which renders brackets around assumptions, while the default jEdit print_mode includes no_brackets, which does the opposite.
The print mode can be changed either by setting Plugins > Plugin Options > Isabelle/General > Print Mode to brackets and restarting jEdit, by adding -m brackets to the isabelle jedit command line, or by including in your ~/.isabelle/etc/settings file:
ISABELLE_JEDIT_OPTIONS="-m brackets"
This will result in jEdit displaying brackets like ProofGeneral:
Go into Plugins -> Plugin Options -> Isabelle -> General
then type in brackets in the Print Mode field.
Click Apply.
Then close out of Isabelle and restart it.
You should have brackets around your hypotheses thereafter.

How do I indent multiple lines at once in Notepad++?

In many text editors that are aimed at programmers, if the user has a selection that spans more than 1 line and presses the TAB key, those lines are indented by 1 TAB (or a number of spaces, depending on how the editor is configured).
However, this does not seem to be the default behavior of Notepad++. Is there a way I can do this in Notepad++, or is there a plugin that I can get to allow me to do this?
Edit: Upon additional testing, SHIFT-TAB correctly un-indents the lines as expected, but only a tab simply inserts a tab wherever the carat is. This is in version 5.4.5 Unicode
The problem was with the QuickText plugin. After removing it, indent worked as normal.
Capslock + Tab to indent multiple lines at once. Highlight the text first.
The problem with the new version of QuickText seems to be that it is set to react to the TAB key. Previously it was set to use CTRL-ENTER. If you change the key combination in the shortcut mapper then your TAB key should start working again, and QuickText should also work (with whatever new key you've assigned).
It works fine for my v. 5.4.5 of Notepad++. I just select multiple lines and press TAB.
If you want TAB to be replaced by SPACE than you need to go Settings > Preferences and select Edit Components tab. Next check Replace by spaces check box in Tab Setting section.
Update: In a newer version of Notepad++ this option is in Settings > Preferences > Language section.
If you're using QuickText and like pressing Tab for it, you can otherwise change the indentation key.
Go Settings > Shortcup Mapper > Scintilla Command. Look at the number 10.
I changed 10 to : CTRL + ALT + RIGHT and
11 to : CTRL+ ALT+ LEFT.
Now I think it's even better than the TABL / SHIFT + TAB as default.
I have Notepad++ 5.3.1 (UNICODE). I haven't done any magic and it works fine for me as described by you.
Maybe it depends on the (programming/markup/...) "Language"?
Just install the NppAutoIndent plug-in, select Plugins > NppAutoIndent > Ignore Language and then Plugins > NppAutoIndent > Smart Indent.
Notepad++ will only auto-insert subsequent indents if you manually indent the first line in a block; otherwise you can re-indent your code after the fact using TextFX > TextFX Edit > Reindent C++ code.
in Notepad++v6.1.8 (Unicode) it works after removing the QuickText plugin.
To increase indent - Press and hold TAB
To decrease indent - Press and hold TAB + SHIFT