How to disable all code folding in Pycharm/Intellij Diff and Merge - intellij-idea

We can see the folding in this Diff/Merge screen by the + signs:
That used to not happen and I want to permanently disable the folding. How can I do that? JetBrains docs https://www.jetbrains.com/help/idea/differences-viewer.html#diff-merge-viewer say the Settings | Diff & Merge can be used:
So here is that settings section:
So where is the setting to disable folding?

Apparently Expand All - when invoked via context menu (right click) does the job. Just invoking via the keyboard shortcut Shift-Cmd-+ curiously did not work

Related

Disable copying entire line when nothing is selected in Intellij

I have recently started using Intellij and I noticed that by default, when you do ctrl+c for copying something when you have nothing selected, it copies the entire line into the clipboard overriding what I had in there before.
This is really annoying yet I cannot seem to figure out how to disable it. I am aware that there is a paste history you can use however this is not what I am after, I just want to disable it like you can do with sublime text.
Is there a way to disable this behaviour so that when I press ctrl+c and nothing is selected it just leaves the clipboard alone?
Since version 2021.2 there is a dedicated Don't copy/cut the current line when invoking the Copy or Cut action with no selection setting for this in Preferences | Advanced Settings on the Mac, Settings | Advanced Settings on other platforms.
For older IntelliJ Platform based IDE's the setting is more hidden:
Invoke Help | Find Action... (Ctrl (Cmd on Mac)+Shift+A), type Registry and select the Registry... item that appears. Enable the editor.skip.copy.and.cut.for.empty.selection option there. Be careful with the other configuration options, because it is possible to break your IntelliJ IDEA installation with an incorrect setting.
In Mac OS X:
Press cmd+shift+a.
Type registry and press return to
open the Registry.
Enable the editor.skip.copy.and.cut.for.empty.selection option.
Click Close.
I suppose it should be same as in WebStorm, or someone might be searching WebStorm solution as I did:
Open the settings: File > Settings > Advanced Settings (bottom of the list).
Start typing "editor".
Check the editor.skip.copy.and.cut.for.empty.selection
Click "OK" or "Apply"
On: WebStorm 2022.3.1
in PHPStorm -> From the Help menu, select Edit Custom Properties.
and paste
editor.skip.copy.and.cut.for.empty.selection = true

How to allow code-folding on Geany IDE?

Is there any way to fold all of functions at one time on Geany IDE?
Is there any way to do that?
I am looking for any option which let my Geany IDE to fold all of the functions at one time.
Go to Document -> Fold All.
One may pre-configure Geany shortcuts for (un)-folding as needed:
Enter
Ctrl+Alt+P to open a Geany [Preferences] settings UI-panel
Select [Keyboard Keybindings] tab on the left,
Scroll down to section [+][Document] and unfold it's attribute settings
Setup an unused keyboard shortcut for each of, as handy:
- Toggle Folding On/Off on a current code-block
- Unfold the whole document
- Fold the whole document
( prompts are not exact, actual Geany language-localisation may provide other expressions while meaning is clear )
One may pre-configure Geany to enable / disable (un)-folding + details:
Enter
Ctrl+Alt+P to open a Geany [Preferences] settings UI-panel
Select [Editor] tab on the left,
(un)-Check selection boxes as preferred in:
[x] Enable folding
[x] Fold/Unfold all children of a fold point ... a [Shift]+<aMouseCLICK> is interpreted as a one-shot reversed setting of this preferences attribute

How do I disable the Search Everywhere shortcut?

IntelliJ IDEA 13 has the new Search Anywhere feature. It sounds like it might be useful, but so far it just gets in the way. It's mapped to some kind of magical shift-based shortcut, and it comes up every time I try to shift-click to select text. When this happens, the pop-up flickers and gets into some stuck state, so the only way to get rid of it is to click in the editor pane, which of course loses the selection.
I call the shortcut "magical" because the Search Everywhere action appears in the Settings → Keymap list with no mapping, so I can't remove this mapping the usual way. Searching the dialog for search gives no relevant results.
How can I disable this buggy feature until it's ready for production use, and get back the ability to select text?
To disable the "Search everywhere" feature, you need to invoke "Go to action" (Ctrl+Shift+A), then type "Registry...".
Scroll down to "ide.suppress.double.click.handler" and check the box.
Source: https://youtrack.jetbrains.com/issue/IDEA-161094
After updating to build 133.331, I tried assigning a normal shortcut to it in Settings → Keymap, and that made it stop appearing on double-shift.
The settings for the new version have changed
Version: IDEA 2021.2.3
Preference > Advanced Settings
Scroll down to "User Interface", find "Disable double modifier key shortcuts" and check the box.
It's called Search Everywhere, and it's present in keymap.
For me it's perfectly disabled.
EDIT As I'v found it is hardcoded now, and will popup at doubleshift source
There is also an issue at jira, about this problem.
I hope it will be fixed soon.
from: https://youtrack.jetbrains.com/issue/IDEA-161094
In IDEA 2021.2:
You could enable the Settings (Preference on macOS) |
Advanced Settings | Disable double modifier key shortcuts option to
disable it.
This problem is still present under linux (ubuntu amd64 16.10 ) on Android Studio using X11Rdp for remote connection, maybe in other situations too - the Search Everywhere dialog appear on single Shift press.
The answer is here
https://youtrack.jetbrains.com/issue/IDEA-114933#comment=27-603899
Basically you need to
Open lib/resources.jar/idea/PlatformActions.xml and remove or comment such line:
<action id="SearchEverywhere" class="com.intellij.ide.actions.SearchEverywhereAction" />
and repack the jar.
Since end of 2017 you can add -Dide.suppress.double.click.handler=true to the custom VM options: cf. the answer from JetBrains.

Php Storm : How can i automate breaking lines in PHPStorm 2.1

How can i automate breaking lines (word wrap) in PHPStorm 2.1?
Automatic wrap example aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa‌aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :
This expression has automatic wrap, because I did not press return.
As I understand you want Soft Wraps, when long line is wrapped on screen into multiple lines, but still remains as single line in file.
Soft Wraps
on per file basis
View | Active Editor | Use Soft Wraps
for all files by default
Settings/Preferences | Editor | General | Use soft wraps in editor
Right margin setting
There is also
Settings/Preferences | Editor | Code Style | General --> Wrap when typing reaches right margin
But that's different (it will make actual new line).
UPDATE: In current builds IDE can use separate value for right margin per different "language" -- as long as that language has an entry in Code Style settings.
Also keep in mind that any settings from .editorconfig files (if you have such files in your project and EditorConfig plugin is installed & enabled) will override the same from Code Style settings -- it's the nature of the plugin and not a bug (it meant to work this way).
Using EditorConfig support you can configure certain settings that otherwise may not be possible to do via Code Style (e.g. settings for languages/file types that have no separate Code Style entry).
Open Settings
Type "Use Soft Wraps" in search box
In keymap tab right click on "Use Soft Wraps" and add a custom shortcut
You will be able to toggle them with that shortcut
In PhpStorm 2019.1.3 You should add file type you want to make soft wrapping on it
go to Settings -> Editor -> General -> Soft-wrap files then add any types you want
For wrapping text/code line by deafault:
File -> Settings -> Editor -> General -> section "Soft Wraps" -> checkbox "Use soft wraps in editor"
In Webstorm 2020.3 i did not found any option for all files by default, but just change the pattern:
for ALL files:
Settings > Editor > General > Soft Warps >
Soft-wrap theses files: you can change value to:
*.*
(in the other words "ANY file name" and "ANY extension file")
for SOME FILES:
*.php; *.html
(Any files with exntension .php OR .html)
simple:
cmd+F8
You can find the list of shortcut by PhpStorm in menu Help -> Default Keymap Reference!
in phpstorm 2016:
Settings/Preferences | Editor | Code Style | General --> default option-> uncheck wrap on typing
To make it automatic
After applying this point:
Use Ctrl + Alt + S to open the settings menu
Select and click Editor
Choose Code Style
Change the default value of the Hard wrap value to 90
Go back to CodeStyle and choose any of the language you work with to make specific changes
5.1 I choose HTML and Select Other and i change the value of Hard wrap at 90 and wrap on typing to Yes
5.2 I choose JavaScript and Select Wrapping and Braces and change the Hard wrap at value to 90 and wrap on typing to Yes
Continue to do it with all other languages you work with
NB: other languages may be at a default values, change it if is not preferable to you
Apply and Ok to save the changes
Using phpstorm 2019.3.4 as well as new and older version :
Use Ctrl + Alt + S to open the settings menu
Select and click Editor
Choose Code Style
Change the default value of the Hard wrap value to 90
Apply and save changes
Press Ctrl + A to highlight and select all your codes in the text editor
Press Ctrl + Alt + L to format your code nicely
Or when using the default settings for Hard wrap at 180 , follow 6 and 7

Disable global Ctrl-Alt-L hotkey in KDE

The IntelliJ IDEA short-cut to reformat source code is Ctrl+Alt+L. This happens to lock the screen in KDE (Gnome too?). How can I disable this so IntelliJ receives the key sequence?
Under the K menu, go to the Control Center.
Regional & Accessibility |
Keyboard Shortcuts |
Shortcut Schemes tab,
Global Shortcuts tab.
In the search box, type "lock", which should narrow the visible shortcuts and show the Ctrl+Alt+L one ("Lock Session").
Underneath, click None.
Click the Apply button.
On KDE Plasma 5 go to System Settings | Desktop Behaviour | Screen Locking
Here you will find a "Keyboard Shortcut" option. Change it to something else or set to none
On Kubuntu 11.10 it's well hidden:
Start System Settings
Under Common Appearance and Behavior, select Shortcuts and Gestures.
Select Global Keyboard Shortcuts in the left-hand panel.
Select the KDE Component: Run Command Interface (important, otherwise you won't see the ctrl-alt-L mapping!)
Select Lock Session
Edit the setting, either choose a different mapping or 'none'.
I eventually found how to disable the lock screen key binding (Ctrl-Alt-L) in the System Setting app.
System Settings->"Keyboard Mouse->Keyboard Shortcuts
I had to choose the KDE component: Run Command Interface.
I'm running KDE on Fedora Core 9.
For Linux Mint:
System Settings -> Keyboard -> Keyboard Shortcuts -> System -> Lock screen
It's easy to disable all global keyboard shortcuts in KDE for specific applications. I've done it in KDE 4 and now I've done it in KDE 5 again. So in KDE 5 right click on your application's window title -> More actions -> Special Window Settings (or Special Application Settings) -> Appearance & Fixes -> Ignore Global Shortcuts -> Force, Yes. It's much easier than to look for each shortcut one by one.
You can check such configurations in System Settings -> Window Management -> Window Rules.
Instead of disabling anything, you can also use ctrl+meta+alt+l in most applications where this problem exists. KDE knows the meta key (aka the 'windows key'), but the applications seem to ignore it and consider it to be just ctrl+alt+l.
I know, old question, but I didn't easily find a decent answer. If anybody is wondering how to disable it on Ubuntu (while the Windows_key + L shortcut will still work):
Go to Settings -> Keyboard -> Shortcuts tab -> System -> select Lock screen and press backspace to clear it.
For KDE Plasma 5
1 - click on K menu, type keyboard, choose Global Keyboard shortcuts
2 - Choose the KDE Session Manager in KDE component , at Lock Session, do what you want, disable the shortcut or choose another!
For Ubuntu 16.04 System settings -> Keyboard -> Shortcut -> System -> LockScreen -> click-it and make changes
I changed my to ctrl+alt+H from ctrl+atl+L
Here is the Screen shot which tells where the above instructions will lead you to.
Keyboard -> shortcuts
Another option is to change the Idea keymap to use Default for KDE.
You can go to File -> settings -> keymap and then select the Default for KDE option from the drop down
Also you can change it with the configuration file.
The following files store the keyboard shortcuts of KDE Plasma 5 and of some of its associated applications such as Konsole and KWrite.
~/.config/kdeglobals
~/.config/kglobalshortcutsrc
~/.config/khotkeysrc
~/.config/kwinrc
~/.config/plasma-org.kde.plasma.desktop-appletsrc
~/.local/share/kxmlgui5/katepart/katepart5ui.rc
~/.local/share/kxmlgui5/konsole/konsoleui.rc
~/.local/share/kxmlgui5/konsole/sessionui.rc
~/.local/share/kxmlgui5/kwrite/kwriteui.rc
Let me add descriptions for the files.
Standard Shortcuts (System Settings > Shortcuts)
~/.config/kdeglobals
Global Shortcuts (System Settings > Shortcuts)
~/.config/kglobalshortcutsrc
"Custom Shortcuts" (System Settings > Shortcuts)
~/.config/khotkeysrc
Konsole
~/.local/share/kxmlgui5/konsole/konsoleui.rc
~/.local/share/kxmlgui5/konsole/sessionui.rc
KWrite > Settings > Configure Shortcuts... > KWrite
~/.local/share/kxmlgui5/kwrite/kwriteui.rc
KWrite > Settings > Configure Shortcuts... > Kate Part
~/.local/share/kxmlgui5/katepart/katepart5ui.rc
For those who prefer visual answers, here's where this settings can be found
IMPORTANT Note that there are two values: Global and Global Alternative. I had to unbind the Global Alternative shortcut to resolve a problem with IntelliJ.
Ubuntu 20.04 + KDE plasma:
Use Global Shorcuts -> System Setting Module menu -> Lock session. Set to "Custom -> None"