How to convert $SELECTION$ to snake case(for example) using live templates? - intellij-idea

How to convert selected code to snake case for example (or camel case or something other standart expression from live template variable options)

The answer was provided in this comment on the JetBrains forum
There is "String Manipulation" plugin that lets you to convert the
case of selected text via the right click menu or via custom
shortcuts assigned at Settings/Preferences > Keymap.
You can install the plugin via Settings/Preferences > Plugins > Browse
repositories.

Related

How to auto-generate comment using custom shortcut in IntelliJ?

I'm trying create a custom shortcut in IntelliJ to generate some predefined comments.
For example, if I write //-- and press enter, it should auto-generate:
//------------------------------------------------------------------------------//
//------------------------------------------------------------------------------//
The Postfix Completetion feature looks like it could be used for this but I didn't figure out how to set it up for this scenario. Can someone help?
If Postfix Completetion is not the answer, can I do it with another feature?
You can create a Live Template (Preferences | Editor | Live Templates). For example, a template like the following:
//------------------------------------------------------------------------------//
$END$
//------------------------------------------------------------------------------//
The $END$ indicates where the text cursor will be placed when the Live Template text is inserted. At the bottom of the Live Template settings screen you can configure in which languages/contexts the Live Template should be available.

What does the scheme dropdown menu do in Phpstorm?

In the settings window of Phpstorm, there is a dropdown box labelled scheme
What does it do?
What does it do?
You may be surprised .. but it allows you to choose another (different) Code Style scheme for this project.
PhpStorm supports globally defined schemas (by default it provides only one -- "Default") which can be used by any project and project-specific schema called "Project" which available for this project only (and stored together with other project-specific settings).
You can read more in official help page.
The Code Style is used for code formatting: be it automatic as you type / use live templates etc .. or manual reformat via Code | Reformat Code...
It's used to
choose the code style scheme to be used as the base for your custom coding style for the selected language (Source).
In other words: after selecting a scheme, you can set different formatting options, like tabs vs spaces, tab size or line breaks etc. To use those settings in your current project, you need to click Manage, select your edited scheme and click Copy to Project. After this, you can press Ctrl + Alt + L (Code > Reformat Code...) in the editor to reformat a file according to those scheme settings.

How to write short codes in brackets?

Just like in sublime you can type foo.bar, press Tab, and you'll get <foo class="bar"></foo>. There's also foo#bar (for id instead of class).
How can we do this in Brackets editor?
This plugin is called Emmet.
Run Brackets.
Select File > Extension Manager...
Find “Emmet” extension and click “Install” button
(source)
Here is the list of all supported platforms.

Where is the live templates for Java in Intellij-IDEA?

I could not find the live templates for Java! Who can tell me how to set? Thanks.
They're inside all the nodes that are not specific to another language than Java: iterations, output, plain, surround, etc.
As JB Nizet wrote there is not a special node for Java (but you can create one). If you want your own Live Template for Java created do the following.
Open Settings window (File -> Settings)
Click on Editor -> Live Templates
Choose Template Group in which you want to add your Live Template
(you can create your own Template Group if you wish)
Click on + icon and choose Live Template
Specify the Abbreviation, Description and Template text.
Do not forget to define the context (in your case Java)
Example
Here is an example of how to create your own TODO text
Open the Setting window with Live Templates editor (as specified above).
Click on + icon and select Template Group.
Name this group Java.
Click on + icon again and select Live Template.
Specify your Live Template and DEFINE CONTEXT.
In my case writing mtodo and pressing enter will result in:
// TODO myName
You can even use variables. Write in your Template text e.g. $DATE$ and $TIME$
// TODO myName $DATE$ $TIME$
Click on Edit variables button and assign to each variable (defined by dollar sign) and expression (predefined function).
Now mtodo will result in
// TODO myName 13.10.2015 15:39
Predefined functions could be found here. The example was created using IntelliJ IDEA 15 EAP.
For those of you who have taken Postfix completion for Live templates, it is worth mentioning they are different. from not-choosing pretty good answers from #JB Niznet and #vitfo, I guess that's the case for OP writer. The document, here, says:
Postfix code completion is similar to live templates, it transforms the current expression without selecting it. For example, you can type .if after an expression to invoke the corresponding postfix completion and wrap the expression with an if statement.
You can check out a list of postfix completions:
Open the Preferences window
Click on Editor -> General -> Postfix completion
By default, there is no JAVA group in this setting page.
However, these default settings distribute on each feature group. For example, iterations:
IntelliJ IDEA 2019.2.4 (Ultimate Edition)

Does Ektron support "Paste from Word"

Hopefully this is a pretty straight-forward question.
Does Ektron support "Paste from Microsoft Word"? The old ContentDesigner editor used to, but does it still? Is it supported (perhaps as a custom Ektron plugin) in the new Aloha editor? If it's not supported, what workarounds have people found?
Yes, this is a standard editor option. It is right next to the paste icon in their standard editor (eWebEdit400), and its icon looks like a paste icon with a word doc over it. It is the fourth icon from the left in the top row.
See the ektron docs for a list of all default editor buttons:
http://documentation.ektron.com/cms400/v802/mobile_help/Advanced/Content/Managing%20Content/Editing%20Content/eWebEdit400/ewe400%20toolbarbuttons.htm
Keep in mind, if you are using version 8.6+ you have the option of installing a 3rd party editor (Aloha comes essentially out of the box). If your installation has been set up this way, you will need to install an aloha plugin for this to work. This plugin can be found at:
http://aloha-editor.org/guides/plugin_paste.html