make intellij sometimes stop at underscores and sometimes not - intellij-idea

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

Related

How to undo in Intellij IDEA replace in files?

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.

How to keep IntelliSense Complete Word option off?

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.

How to stop IntelliJ from placing semicolons after an auto-completion?

so this is annoying me because I use tab to leave brackets etc and when I use auto-complete and a semicolon is being placed after the bracket this happens:
https://streamable.com/i9as2
as you can see in the first statement I'm having problems "jumping" over the semicolon while when I dont use the auto-completion in the second statement (and don't get the semicolon automatically) it's way easier to navigate through it with tab. I know that there is the shift-enter shortcut but I don't really want to develop a habbit of using it so often because I can imagine trying to do that when working with my other IDE's can become quite annoying. I searched through the options but did not find any option do disable that behavior. Does anyone know a way to get around this?
Second Tab press should jump after the semicolon, I've created a feature request for that.
It's already fixed and the fix will be available starting from 2019.2 IDE version.

IntelliJ Have Safe Delete on by default

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

How to use multiple tabs when tagging to a function in Vim

I use ctags with my Vim and I rely heavily on C-] and C-T to tag back and froth between various functions in my project.
But if the function is in a different file, I'd like Vim to automatically open it in a new tab instead of the current tab. If I pop my tag stack using the C-T, I'd like it go back to the original tab where I pressed by C-] instead of changing the file in the current tab. I don't like to have the same file opened in multiple tabs in Vim. This is the normal behavior for most IDEs and I am wondering if there is a way to do this in Vim?
nmap <C-Enter> <C-w><C-]><C-w>T
Does this help ? You could probably figure out something similar for the way back.
Well, we need to decide what would be the wanted behaviour. We can go back to the original tab (not sure how, still investigating) but then the above given mapping is gonna open a new tab next time. So you'll end up with a lot of tabs after a while.
Or we can do <C-w>C, which will close the opened tab and take us back to the original one. I, personally, prefer this way of working (that way I don't lose my position in the file)
I go to the function I want, make my corrections there then return to the original file from which I started.
Let me know, what would you like (this didn't fit in comments so I put the answer here).
This might point you in the right direction:
http://vim.wikia.com/wiki/Open_every_buffer_in_its_own_tabpage
So, this is a feature I would like to see as well.
I'm not sure if it's possible.
What I usually do is
:tabnew
:tag somepartsoffunction*
and press tab to use globbing to easily find tag.
Sure, it's not an ideal solution, but it works most of the time.
Unfortunately, with VIM tabbing isn't totally integrated since it's a new feature since 7.0. Most people I know that use VIM weren't even aware of tabs until I told them, so with that, I have a feeling there is no way to do it right now.
(I would love to be proven wrong)