I am looking for plugin for PhpStorm that allows me to surround selected text like it is in Sublime Text.
Example:
//selected text:
foo();
//press the ' char
//result
'foo();'
I totally do not know how such plugin may be named.
It's a built-in functionality. Just ensure that you have this option enabled:
Settings/Preferences | Editor | General | Smart Keys --> Surround selection on typing quote or brace
Related
IntellIJ 2020.2 added Indentation-based brace handling for Scala mentioned on the website here whatsnew. How do I disable this feature? I've searched for keywords "indent brace" and "brace handling" and cant see a setting that would disable it under "Code Style -> Scala".
As per IntelliJ Scala Plugin 2020.2: Indentation-based Brace Handling search for
Editor | General | Smart Keys | Scala | Control curly braces based on line indentation
When I copy this, for example:
<AdmobComponent/>
It pastes as:
< AdmobComponent / >
Does anyone have any suggestions? I don't even know where to start to fix this.
From within the IDE:
Go to File | Preferences | Settings and then click Text Editor | Formatting.
The top option should be FormatOnPaste, make sure this is unchecked.
If you are using the Prettier extension, then this is a known issue.
For anyone having a similar problem in Visual Studio 2019 it can be fixed as follows:
Go to Tools | Options | Text Editor | {language}
Now depending on the Language the options that need to be changed could be in a few different places or missing. But for C# and JavaScript go to Code Style | Formatting
Once there there are a few options. If "Automatically format on paste" is unticked it will completely remove any reformatting on paste.
Or for a more limited impact go into the "Spacing" section and change "Set spacing for operators" to "Ignore spaces around binary operators". By doing this some automatic reformatting is lost but I think it's worth it not to have all those spaces inserted into stuff like Kebab case variables.
I want to keep track of a todo list in Visual Studio Code.
Is it possible to display/toggle strikethrough text:
task not yet done
̶t̶a̶s̶k̶ ̶d̶o̶n̶e̶
(used https://www.piliapp.com/cool-text/strikethrough-text/ for the above).
Looking for a solution natively or with an extension. The strike-through text needs to be displayed in the text file (like the functioning of org mode in emacs) and not in some output window (like the rendering of a HTML/Latex/MD document).
Any experts in Visual Studio Code that know if this can be done and how to do it ?
You can make strikethrough in vscode with the help of TODO Highlight extension:
"todohighlight.keywordsPattern": "(~~.+?~~)|(✔.+?\n)|(\\[x\\].+\n)",
"todohighlight.defaultStyle": {
"color": "none",
"backgroundColor": "none",
"textDecoration": "line-through"
},
Use patterns that you usually use for done todos. The above works for such:
[x] done
✔ done
~~done~~
After that you can either use plain typing or find some toggling extension or write one yourself.
Try the extension "Strike for VSCode", looks very lightweight extension.
Highlight the text you want to strikethrough and hit CTRL K + backspace.
CTRL K + backspace again to toggle.
You can use the built in function of adding "~~" before and after the text
so its like:
~~strikethrough~~
which strikes the words in between.
This can be done without extensions.
How to enable auto select non-word characters in Visual Studio code?
Here is the setting in atom.
This would enable selection of variables like $foo or colours #fff with just a double click in Atom Editor. And by selection I mean from $ to o in $foo. At the moment when double clicked on $foo, VSCode selects only foo.
Is there a way to enable this?
settings.json
"editor.wordSeparators" from default: ~!##$%^&*()-=+[{]}\\|;:'\",.<>/? remove symbol
dollar:
"editor.wordSeparators": "`~!##%^&*()-=+[{]}\\|;:'\",.<>/?"
sharp:
"editor.wordSeparators": "`~!#$%^&*()-=+[{]}\\|;:'\",.<>/?"
both:
"editor.wordSeparators": "`~!#%^&*()-=+[{]}\\|;:'\",.<>/?"
I've got a problem with php storm. Every time I press Enter after a word, PhpStorm makes up a tag instead of a new line as you can see here:
Do you know where I can disable this function?
Please check your Emmet settings (expand key) -- you may have Enter as expand key -- use more traditional Tab or something else instead.
Settings/Preferences | Editor | Emmet