Scrolling past the end in IDEA - intellij-idea

Is there a way to enable being able to scroll past the last line in IntelliJ IDEA?
It's a nice feature that exists in some editors, as it lets you keep your eyes at the middle of the screen, rather than have to stare at the bottom of it
Is there any way to enable something like this? Either through the standard settings or via plugin?

File -> Settings -> Editor -> General -> Check Show virtual space at file bottom

Mac: IntelliJ IDEA -> Preferences -> Editor -> General -> Check: Show virtual space at file bottom
PC: File -> Settings -> Editor -> Check: Show virtual space at file bottom

Short way:
You could also hit shift key twice to open menu and write "show virtual space" and then just click on the option to toggle it on/off.

Related

How to set default show line number and white space in PhpStorm 2016.1

How to make line number visible in PhpStorm 2016.1?
I can't find setting in preferences.
Use CMD+SHIFT+A (on Mac) to search for actions across the IDE, including the preference pane. In this instance, typing "Line Numbers" into the search box takes you right to the preference pane for that option, with it highlighted nicely for you (http://c.hock.in/17c45d.png). This works for any settings you can't find, or want to find quickly.
Preferences if your are on Mac | Editor --> (General) --> Appearance --> Show line numbers.
File->Setting->Editor->Appearance->show line numbers for Windows users
1.
PhpStorm 2016.1 for Active Editor only
Main Menu:
View -> Active Editor -> Show Line Numbers
===========================================
2.
PhpStorm 2016.1 for all tabs
Main Menu
File -> Settings:

How to scroll current line to the center of screen in PyCharm 1.5.4 with emacs keymap

I try to figure out how to center the current line in the center through PyCharm.
The default key binding of emacs is C-u C-l but it doesn't work in PyCharm.
Any suggestion?
The default key binding for this is CTRL-M.
Go to File -> Settings, then Keymap, then Editor Actions -> Scroll to Center. There you find the feature, and you can remap it to any other binding.
This is an Intellij-Idea IDE feature and not limited to the PyCharm editor.
Go to: Preferences -> Editor -> General -> Virtual Space -> Show virtual space at file bottom
Tick it.
Add a Keyboard Shortcut for Scroll line to middle. Ctrl+l
There is no such action in PyCharm, feel free to submit a feature request.

How do I turn off the unlimited whitespace in IntelliJ editor?

How do I remove the ability to move the cursor after the end of line in IntelliJ?
File menu -> Settings -> Editor -> General -> Virtual Space and uncheck 'Allow placement of caret after end of line' . You may also uncheck the other options in the Virtual Space panel.
If the other answers don't seem to be working, you might have Column Selection Mode enabled. On my Mac it's mapped to Cmd+Shift+8. It's located under the Edit menu. That menu item will show a little checkmark when the mode is enabled.
To get the expected behavior where indentations are respected when you click on a line :
In Preferences > Editor > Virtual Space
Check :
Allow placement of caret inside tabs.
Uncheck :
Allow placement of caret after end of line.
This was really annoying to me and makes very little sense as a default behavior to me.
Note that for Intellij IDEA 11 for mac, settings are placed under the IntelliJ IDEA menu and called preferences. (Maybe some sort of mac default ?)
What Matt_Bro said (first answer), but if you've already got the box unchecked in preferences, try re-checking it (I checked all the virtual space boxes) and restarting. Then uncheck and hit apply--at this point unlimited space was disabled for me.
IntelliJ IDEA 2016
By default, it's turned off (unchecked).
If it is turned on, you can use one of the following 2 approaches:
File > Settings... (or Ctrl+Alt+S) > Editor > General > Virtual Space section > uncheck Allow placement of caret after end of line
Help > Find Action... (or Ctrl+Shift+A) > type "Virtual Space: Allow end" > Enter or left click (to switch between On and Off) > Esc

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"

How can I permanently enable line numbers in IntelliJ?

How can I permanently enable line numbers in IntelliJ IDEA?
IntelliJ 14.X Onwards
From version 14.0 onwards, the path to the setting dialog is slightly different, a General submenu has been added between Editor and Appearance as shown below
IntelliJ 8.1.2 - 13.X
From IntelliJ 8.1.2 onwards, this option is in File | Settings1. Within the IDE Settings section of that dialog, you'll find it under Editor | Appearance.
On a Mac, these are named IntelliJ IDEA | Preferences...
The question is obviously well answered already, but since IJ 13 you can enable line numbers in 2 seconds flat:
Press shift twice
Type "line number"
The option shows in the menu and press enter to enable/disable.
Et voila ;)
NOT a solution, rather a TEMPORARY solution which only works only for the current editor and current session:
Simply right click on the place where the line-numbers should be, and there you'll see a small menu.
then, mark the "Show Line Numbers" option.
Please note that this only works on a per-file basis, however. Enjoy.
In Intellij 13 the layout has changed, the Settings button can only be found in File -> Settings and not in the toolbars, and from there you follow the same steps: Editor -> Appearance -> Show line numbers, or search for Line numbers in the Settings search input.
Android Studio 1.3.2 and on, IntelliJ 15 and on
Global configuration
File -> Settings -> Editor -> General -> Appearance -> Show line numbers
Current editor configuration
First way: View -> Active Editor -> Show Line Numbers (this option will only be available if you previously have clicked into a file of the active editor)
Second way: Right click on the small area between the project's structure and the active editor (that is, the one that you can set breakpoints) -> Show Line Numbers.
For InteliJ IDEA 11.0 and above
Goto File --> Settings in the Settings window Editor --> Appearance
and tick Show line numbers check box.
IntelliJ 14 (Ubuntu):
See: how-do-i-turn-on-line-numbers-permanently-in-intellij-14
Permanently:
File > Settings > Editor > General > Appearance > show line numbers
For current Editor:
View > Active Editor > Show Line Numbers
IntelliJ IDEA 15
5 approaches
Global change
File > Settings... > Editor > General > Appearance > Show line numbers
Hit Shift twice > write "line numbers" > Show Line Numbers (that one that has the toggle) > change the toggle to ON
Change for the Active Editor
Right click on the left side bar > Show Line Numbers
Hit Shift twice > write "line" > Show Line Numbers (the line doesn't have the toggle)
Ctrl + Shift + A > write "Show line" > Active Editor: Show Line Numbers > change the toggle to ON
Ok in intelliJ 14 Ultimate using the Mac version this is it.
IntelliJ Idea > Preferences > Editor > General > Appearance > Show Line Numbers
On IntelliJ 12 on MAC OSX, I had a hard time finding it. The search wouldn't show me the way for some reason. Go to Preferences and under IDE Settings, Editor, Appearance and select 'Show line numbers'
Android Studio
Go to Android Studio => Preferences => Editor => General => Appearance => set Checked "Show line numbers"
I just hit this with IdeaVim plugin installed, where even if I set Show Line Numbers, it continued to revert to hiding them.
The (forehead-slapping-worthy) solution was:
:set nu
I add this response for IntelliJ IDEA 2018.2 - Ultimate.
Using menu
IntelliJ Idea > Preferences > Editor > General > Appearance > Show Line Numbers
Using Shortcuts - First way
For Windows : Ctrl+Shift+a
For Mac : Cmd+shift+a
Using Shortcuts - Seconde way
Touch Shift twice
These three methods exist since the last 4 versions of Intellij and I think they remain valid for a long time.
1st way: Go to View => Active Editor => show line numbers
2nd way Go to Android Studio => Preferences => Editor=> Appearance => set Checked "Show Line Numbers"
For 9.0.4
File > Settings
In the tree view group
------------IDE Settings ---------
Click the Editor [+]
Select Appearance... Its there.
On Mac Intellij 12.1.2 there is no File-Settings:
There is an application-name menu item to the left of "File" with a "preferences" menu item:
and within that is the "Settings" dialog shown by the Windows Intellij.
In IntelliJ 14 it has moved again somewhat down the menu.
Now we have it unter Editor -> General -> Appearance
Just an update for Android Studio 1.5.1 on Windows:
Go to File -> Settings -> follow picture
On IntelliJ IDEA 2016.1.2
Go to Settings > Editor > General > Appearance
then check the Show Line number option
IntelliJ 2019 community edition has line number by default. If you want to show or hide line numbers, go to the following settings to change the appearance.
go to → File → Setting → Editor → General → Appearance → [Check] Show line numbers
For IntelliJ 20.1 or above, on Mac OSX:
IntelliJ IDEA -> Editor -> General -> Appearance -> Show line numbers
Point to be noted: Always look for Editor
For shortcut:
⌘ + ⇧ + A (command + shift + A)
type
and click on the pop up to turn on Show line numbers and you are good to go.