‘Make the editor work like Sublime Text or Crimson!’

So goes the several dozen requests I get each year.

Well, in version 4.1, we’ve got something I think you’ll like. It’s a bit different than column text edit modes – but it allows for the same idea, and it’s even more powerful…I think.

Give this a whirl :)
Give this a whirl 🙂

You can set the multi-cursor ‘hot key’ in the preferences:

This is on Windows, might look different on a Mac..'Command' vs 'Windows'
This is on Windows, might look different on a Mac..’Command’ vs ‘Windows’

You like?

thatjeffsmith
Author

I'm a Master Product Manager at Oracle for Oracle SQL Developer. My mission is to help you and your company be more efficient with our database tools.

29 Comments

  1. Abraham Olsen Reply

    Using a Mac, SQL-developer 18.3, database: 12c
    I cannot make click-shift-control do the magic of multi-cursor. Soon as I hit Control and Click, the “right click” menu rolls down.

    However, if I switch to Block Selection, I can hold shift pressed and use Down arrow to make a multi cursor on each line, which is nicer than having to click around.
    Esc releases the cursors, so ther’s one left to play with.

    Block Selection and Multi Cursor are both very nice features.

  2. Hi Jeff,

    Is there a setting to allow the multi cursor edit to work with a mouse scroll?

    CTRL-SHIFT mouse scroll?

    Version 4.2.0.17.089
    Build 17.089.1709

    Thanks.

  3. Hello,

    I’m able to add new multi-line cursors with Ctrl+Alt+Down while editing packages but not in a SQL Worksheet. Only Ctrl+Shift+Click works in SQL Worksheet to add multiple cursors. Why it’s so?

    • I have this issue as well. The options ‘Add Cursor Above’ and ‘Add Cursor Below’ are greyed out in all SQL Worksheets, but available in all Object Editors. It would be very nice to have them in SQL Worksheets as well.

  4. Thanks Jeff.
    Can we select with arrow keys instead of mouse clicks? like that in Microsoft SSMS or Visual Studio?

  5. Nice…

    How about combining this with Code Templates, by multi-selecting all instances of [xxx] in a template after expansion? 🙂

  6. Nice feature Jeff, thanks.
    I’m interested in the feature at the start of your animation where you hover over the asterisk and “explode” the table columns. This doesn’t happen for me, but I probably have some options disabled (for example I tried enabling the Completion Insight settings but it made no difference). Please advise. Version 4.1.1.19.

    • thatjeffsmith

      the table cols ‘explode’ should work for everyone in 4.1

      the select ‘explode’ will only work if you’re on a 12c db though

      can you send me a screenshot of your worksheet?

      also, try a blank worksheet, type
      SELECT * FROM HR.EMPLOYEES

      wait a second, do you get a squiggle under the ‘*’ ?

    • We are on 11g, so I guess that explains it? No, there is no squiggle that appears, nothing happens at all if I hover over the asterisk. I’m not sure how to send you a screenshot, but it probably wouldn’t show you very much.

    • thatjeffsmith

      No, it should work.

      View > Log

      Statements

      When you type your statement, you should see our parser running these two queries. First, we try to figure out what kind of object you’re querying. Then we ask the data dictionary for a list of columns on said object.

      begin SYS.DBMS_UTILITY.NAME_RESOLVE(?,?,?,?, ?,?,?,?); end;

      SELECT ‘COLUMN’ type, owner, table_name object_name, column_name, column_id, data_type
      FROM sys.all_tab_cols
      WHERE hidden_column = ‘NO’ and rownum <=999 and owner = ? and table_name = ? Do you see these running? Try running them yourself using the bind variables as shown in the log. If you get nothing back or an error, that's why the feature isn't working for you.

    • Thanks Jeff. But what were you saying regarding a 12c database previously?

      I enabled the log/statements tab as you suggested. No amount of hovering over the asterisk makes anything appear in the log. I’m not sure whether the whole query needs to be highlighted first or not, but I tried with and without and it makes no difference.

      I am able to run the all_tab_cols query with no problems. I haven’t tried the dbms_utility call as I don’t know what the parms are.

  7. if you could please help, install sql developer v4.1 and facing a problem that courser cursor disappears using debian jessie 8.0 with jdk 8 which runs fine with sql developer 4.0 with jdk 7.x but i prefer the new with it’s cool panel DBA > Database Status > DB instance.

  8. Alexandre Focante Reply

    I would love to see an option where you could press Cntrl+Shift and drag down vertically to select a block of lines to multi-edit .

  9. Robin Moffatt Reply

    Great feature. Not sure if this is the same or different, but I was looking for block-select too (think it might be called column selection) — might that make an appearance?

    thanks!

  10. Hi Jeff.

    Neat, and perhapsfunctional for writing new sql, but that’s still going to be a lot of clicks. Probably still easier to paste it into Sublime Text, do the heavy duty editing, and then paste back into SQL Dev.

    Most apps do implement a click and drag, for Sublime it’s shift-RightClick and just drag.

    • thatjeffsmith

      yeah, I think there’s something that we can do about that, just have to circle the developer back in

  11. Nigel Richmond Reply

    Hi Jeff

    I like it! However, the only one downside I see is having to click on each individual line. That could get tedious for a larger amount of lines.

    I would love to see an option where you could press Cntrl+Shift and drag down vertically to select a block of lines to multi-edit .

    • I concur. This is a feature all editors should have, but loses vital points for not being able to click/drag.

    • thatjeffsmith

      i’m all for less mouse and more keyboard, trying to get the keyboard toggle to work for the GA release

Write A Comment