Oracle SQL Developer: how do I make the Home and End keys behave? - oracle-sqldeveloper

When I'm working in a Worksheet in Oracle SQL Developer, the Home and End keys jump me to the beginning and end of the whole Worksheet respectively, not the beginning and end of the current line. Is there a way to change this behavior?

Set your shourcut behaviours in Tools -> Preferences -> Shortcut Keys
source :
http://www.thatjeffsmith.com/archive/2012/11/keyboard-shortcuts-in-oracle-sql-developer/

Related

Why did my code turn into another language..?

Basically, I touched something in visual studio code that made my .js script turn into a SQL script but the script name is main.js and not main.sql
This is how the file looks:
And this is how the code editor looks:
Also, there is a file name data with a SQL file in it that file is normal I was just practicing SQL was also trying to see if i can store data with SQL for a discord bot
There are multiple ways to fix this:
Firstly you can change the language mode by clicking on the bottom where it says the language mode:
You will then be prompted to change your language mode
You can also do this in the command pallete
Press ctrl + shift + p (by default) and the command prompt will pop up, type change language mode and the option will then appear.
You can also press ctrl + m and then k by default, where you have the ability to change the language mode there

Column editor in Oracle Sql Developer

Anyone knows if there is a column editor function in Oracle SQL Developer?
I have to modify the same column in a large number of insert statement and it would be really useful to have a column editor.
To explain better which is my problem i am searching a function similar to Eclipse ones when you type Alt + Shift + A (How do I enable the column selection mode in Eclipse?), and it allow you to edit in one time a lot of columns.
There is something similar or i have to do it manually?
I am using 4.1.5.21 version.
Thanks
If you're using a newer version of Oracle Sql Developer (at least 18.3.x but perhaps before) there is an even easier way.
Simply go to the "Edit" menu and then choose "Block Selection":
Edit/Wrap Selection (enable it):
https://www.thatjeffsmith.com/archive/2012/07/how-to-block-select-text-in-oracle-sql-developer/
Just press Shift and move cursors up and down, etc.
Be careful to press Esc after each edition as it seems to "stick" or something and it keeps adding cursors and modifying where you don't expect it.
Trick: The multi-cursor is useful to edit several parts in the same line.

'End' key not going beyond trailing whitespace of line in Eclipse

When I press the End key (in Windows) to get to the end of the line in Eclipse, I don't get to the actual end of the line if there's trailing whitespace. Instead I get to the beginning of the trailing whitespace, and subsequently pressing End causes the cursor to alternate between the end and beginning of the whitespace. Is there a way to make it always go to the end?
You can turn off »Smart caret positioning at line start and end« in Preferences → General → Editors → Text Editors. Unfortunately, this seems to be only switchable for both the Home and End keys at the same time. So you'll have to decide whether you want a working End key or a smart Home key.
Personally, I need the Home key more, so I leave it as it is. I can't think of any example of a scenario where the End behavior of Eclipse could be of any use. The ways of the Eclipse devs seem to be beyond human understanding.
(Used Eclipse version: Mars.2/4.5.2)
Go to Window->Preferences->General->Keys and look at the settings for "Line End" and "Text End". Make sure you have the End key set only for Line End.

How to move out of auto-completed brackets in IntelliJ IDEA (without using the arrow keys)?

I recently switched from Eclipse to IntelliJ IDEA, and found myself wondering how to move the cursor out of a pair of auto-completed brackets.
In Eclipse after I finished typing in a pair of brackets, pressing tab brings me out of the brackets. How can I do the same thing without using the arrow keys?
Many thanks for your help!
IDEA doesn't have such feature yet. The closest equivalent is the Complete Current Statement editor action (Ctrl+Shift+Enter).
UPDATE
Initial implementation for this feature is available in 2018.2 EAP version - press Tab to jump out.
It works more like in MS Visual Studio - without visual indication of tab 'exit' position. For now, it should work in Java, SQL, Python and some other files. It will take some time for other languages to catch up - some language-specific code changes are required.
The feature is disabled by default, you can enable it in
Settings -> Editor -> General -> Smart Keys -> Jump outside closing
bracket/quote with Tab
Ctrl + Shift + Enter does not seem to work for me in IDEA 12.1.4, but I found the closest feature to what I was looking for was Shift + Enter. This completes the line, creates a new line below the current line and moves the cursor to it.
You can do this by pressing the closing symbol that you would've pressed otherwise, but was auto completed. For example, if you have just typed the f below, you would press shift and 0 (or closing parenthesis), and it will move your cursor outside of the parenthesis.
String asdf = "hello world";
System.out.println(asdf);
I went to preferences->Keymap and set a shortcut for "Move Caret to Line End" to Shift-Space. It takes me to the end of the current line I am on without adding anything, if that's what you want.
Not currently supported by Intellij. There is an open feature request on this at http://youtrack.jetbrains.com/issue/IDEA-74666. Extra votes would be nice.
Intellij supports the ctrl+shift+m shortcut that jumps to the end of the block:
https://www.jetbrains.com/help/idea/2016.2/navigating-to-braces.html
It's not quite what you're looking for, but you can type the character you are trying to move outside of (a closing paren, for example) and that should pop you outside of the auto-completed character.
Not ideal, but functional as far as I've tested it.
I set these setting:
1) I added Semicolon shortcut to Complete Current Statement:
Instead of using for loop command, I using fori command (because for command needs semicolon character):
2) I added Alt+Semicolon shortcut to Move Caret to Code Block End:
So when I inside the loop, by pressing Alt+Semicolon jumping end of the bracket, by pressing Semicolon I jumping out the bracket subsequently.
by adding these shortcuts, the speed of coding will be faster.
Such key is called "End".
You can assign any unused shortcut to "Move Caret to Line End" action in "Settings/Preferences | Keymap".
P.S. You can use Ctrl+Shift+Enter to complete your statement (in your case it will place caret at the end of line and will add ";" there) -- action called "Complete Current Statement" and shortcut can be checked/changed in a same way as described earlier.
If you decide to move back to Eclipse and use PyDev this feature by default is disabled, First Switch to PyDev Perspective and you can enable it by going under Preferences>PyDev>Editor>Typing>Enable link on Automatic parenthesis or literals closing

Eclipse semicolon inserted before cursor when typing full line not using content assist

This behavior is dring me batty.
I type the following:
fileName.append(c.get(Calendar.HOUR_OF_DAY))
Now when I typed that the content assist poped up. I did not pick HOUR_OF_DAY from the content assist nor did I press enter to fill it in automatically. I just typed "HOUR_OF_DAY". I typed both end parens ")" at the end of line too, I did not press tab.
My cursor is now at the end of the line and I type ;
Eclipse inserts the ; AFTER the cursor! So when I press enter, the semicolon moves to the next line!
I've tried everything I can think of in the preferences. I turned on "auto smeicolon" option that is supposed to place semicolons at the end of the line automatically but it doesn't fix this.
One clue: if I press "ENTER" before typing ";" at the end of the line, the content assist window goes away and the ; is inserted properly with the cursor now afte the ;. So content assist is messing with me.
Any help is appreciated.
Go to Window -> Preferences -> Java -> Editor -> Typing and uncheck Semicolons in the Automatically insert at correct position group.
Yeah I just started seeing this exact behavior after changing some of my preferences, I switched them back and the behavior went back to normal.
Preferences > Java > Editor > Content Assist:
These settings are the default and do not produce the bad behavior you describe.
When I was seeing the unwanted behavior, I had the delay set to 50ms and the auto activation triggers set to ".(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"