In older versions of IntelliJ I remember that Safe Delete was always activated by default, or at least it remembered the last state that I left it in. Now in Intellij 14.0.2, whenever I go to delete, when I'm prompted whether I want to execute Safe Delete, the Safe Delete, Search in comments and strings, and Search for text occurrences check boxes are always unchecked and I have to go check them again ever time that I delete. Is there some way that I can change this?
Sounds like some regression. You should report it as a bug on youtrack.jetbrains.com. In the meanwhile, here is a possible workaround:
There is a Safe delete action in Settings/Keymap which is mapped to ALT+DELETE (⌘ + DELETE on Mac) by default. You can use this shortcut (or remap it to something else) for invoking safe delete directly.
When you invoke the Safe delete dialog using this action there are two checkboxes (Search in comments and strings, Search for text occurences). Those are not checked by default, but when you invoke the Safe delete action again, IntelliJ remembers the previous options (which is another reason to think that the behavior for the normal delete dialog is a bug).
Give it a try
Related
I would like that when I write the name of a property and I tab to autocomplete, it put "this" prefix automatically.
For exemple:
If I tab, I get this:
I would like to have this instead:
There are my visual studio settings, Resharper settings and editorConfig:
(Edit: I've opened a feature request: https://developercommunity.visualstudio.com/t/Visual-Studio-2022-auto-prefix-propertie/10221630)
(Edit 2: The language is C#)
This would need to be a feature request. You can submit that through VS with the Suggest A Feature on the feedback menu.
When you press tab to commit the completion item, the text to insert (or "insertion text") for that item has already been calculated. In most cases, it is the text seen (known as the display text), but sometimes the insertion text can be different (or even include edits other places in the document!). There is also the possibility, depending on how each language implements the completion feature, that the language can make additional calculations and edits as part of committing the item.
In either event (pre-computed or computed during commit), the language feature would need to make changes to include the this. prefix as part of the completion commit edit.
A possible alternative to waiting for a new feature would be to write an editor extension that monitors the buffer changes, and when it sees an applicable member inserted without the required this. prefix, it could then trigger its own edit automatically to insert it.
In intellij 2022.1, I use Ctrl+Shift+R to bring up the Replace in Files window - it shows 100+ matches in 40+ files. The search string and the replace string differ in only one character, for example: this.bar.is.fooed and this.barf.is.fooed. I only need to replace certain instances based on nearby text.
I'm in the groove, clicking the Replace button, checking the next entry, clicking, checking, ... and thinking my brain can keep things straight (it can't; neither can yours:-) I'm halfway through when I realize the last few replaces were wrong.
How can I undo them? Ctrl+Z is grayed out. This related SO question doesn't say and neither does the JetBrains documentation!
Use Local History to revert the changes.
Undo/redo is not supported for Replace dialog, vote for the related request.
IntelliSense has a mode where if you hit the spacebar, it will automatically type out the suggested auto-complete word. In order to prevent this from happening, you can hit the Escape key before pressing Space. This will close the autocomplete popup, so that the suggested word is not automatically typed.
I prefer the alternative setting, where I actually have to hit the Enter key to accept the suggested autocompletion. If I just type Space, I want a space to follow the characters that I actually typed.
I know that I can toggle between the undesired mode and the second mode I describe, which I do want. To do this, I click Edit -> IntelliSence -> Toggle Completion Mode.
My problem is that this setting never sticks. It constantly reverts to the wrong mode. I'm not sure exactly when it's changing, but it seems to revert back several times a day. If I change this for one Solution, it won't apply to my other Solutions. Even if I apply it to a solution, close VS, reopen, and start working again, it will have reverted.
Does this happen to everyone else, or is this unique to me? Is there some global setting that forces this feature to stay off always? Do I have a corrupted file somewhere that's causing this?
No, this is normal behavior and this setting behaves like what you described in the previous VS versions.
However, thanks to those members who is reporting this issue and Microsoft has fixed this behavior in the latest VS2019 version.
Since VS2015 is not supported by Microsoft so far, so this behavior cannot be fixed on VS2015 and I suggest you could install the latest VS2019 Community and get what you want.
Once you click the Toggle Completion Mode under Edit-->Intellisense, no matter you close VS, create a new project or a solution, use other c# file editor, it will never revert back.
sometimes I want to select everything including underscores and sometimes I don't. I want to be able to manipulate that behavior using a hotkey or similar
https://intellij-support.jetbrains.com/hc/en-us/community/posts/207073835-Where-to-set-word-boundaries-for-Ctrl-Arrow
there exists that setting to globally enable it or disable it but that is not what helps me
sometimes I want it to stop on _ and sometimes I don't.
just an example:
I have this code line:
$this->wp_user->remove_role(MOTR_USER_ROLE_ORGANIZATION_TEMP);
and I want to add:
$this->wp_user->add_role(MOTR_USER_ROLE_ORGANIZATION_ACTIVE);
now if stop on underscore is enabled I have to click soo many times to get to _TEMP at the end. But if it is disabled I have to click a lot as well to delete remove_ from the function call. I want to manipulate that behaviour using a plugin or similar. Does something like that exist?
https://plugins.jetbrains.com/plugin/194-toggle-camel-humps seems to work you need to change the binding in the keymap though as default is assigned to ctrl+shift+a which is already in use in my case
One of the more annoying aspects of IntelliJ for me is how the default way to delete a portion of text I highlight with my mouse is to press shift+delete, rather than simply delete. I'm aware that I can go to Preferences --> Keymap to customize controls like this, but I'm not sure exactly which function to change and how to set it to the delete key.
I'm using the 2016.1.3 Community Edition for OS X.
I figured out what was going on — I had rather absentmindedly installed the IdeaVIM plugin, which adds weird (vim-like) keybindings, one of which is that you need to press shift+delete to delete a highlighted portion.