Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Keyboard shortcuts

h-bach's profile image h-bach posted 6 years ago in General Permalink
Is there somewhere I can get a list of keyboard shortcuts?

Specifically, is there a keyboard shortcut to scroll through the query history?
ansgar's profile image ansgar posted 6 years ago Permalink
See Tools > Preferences > Shortcuts.

But there is no special shortcut for scrolling there. Arrow right + down should do that.
h-bach's profile image h-bach posted 6 years ago Permalink
Thanks, Ansgar. It would be nice to be able to flip through prior SQL queries easily, maybe something akin to the unix command line. Cheers.
ansgar's profile image ansgar posted 6 years ago Permalink
There is only Ctrl+Z and Ctrl+Shift+Z which does the normal undo + redo actions. The history is just mouse-clickable, not really usable with the keyboard, which is often the case in GUIs. But I guess it makes sense to add some shortcut here, as the underlying query history is already there.

What would be a reasonable default shortcut for going back to the last query, and forward to the next query?

Keep in mind that users may accidentally press such a shortcut and loose the current contents of the editor. The Ctrl+Z and Shift+Ctrl+Z shortcuts should revert these "back" and "forth" actions.
h-bach's profile image h-bach posted 6 years ago Permalink
I'd be happy with ctrl-arrow-up, ctrl-arrow-down. And this should loop us backwards and forwards, replacing current content with prior ones. Thanks, Ansgar.
byman64's profile image byman64 posted 1 month ago Permalink

I am searching how can move line up or down like in others editor.

I mean something like:

ALT + UP Arrow move the current line up and

ALT + DOWN Arrow move the current line down

I use it on notepad++, Visual Studio Code, Visual Studio 2019, Server Management Studio (SSMS). I don't remember but others editor use the same shortcut.

any idea if and how I can do it?

thx

ansgar's profile image ansgar posted 1 month ago Permalink

You may watch out for such an action in Query > Editor commands. Though I could not find one in a hurry:

Description

byman64's profile image byman64 posted 1 month ago Permalink

Thanks for reply...but I am not still find a command to move a line up or down.

I could select a line + cut + paste + move up/down in another line but ALT + UP/DOWN it's really more useful.

Any idea how can do it?

ansgar's profile image ansgar posted 1 month ago Permalink

Then there's no way to do that per keyboard shortcut. Probably using the mouse per drag'n drop.

There seems to be a way to create custom shortcuts, but I have no clue how to accomplish that. See the SynEdit sources.

byman64's profile image byman64 posted 1 month ago Permalink

I didn't know the editor name used...seems it's possible

I found the following discussions:

One seems a macro but I don't how to it :-(

byman64's profile image byman64 posted 1 month ago Permalink

Another similar discussion reports Solved with editor macros and assign keys to them. Here are my editor macros to mimic the Notepad++ behavior. IDE Shortcuts to move and duplicate lines?

Code modification/commit 325ceed from Ansgar Becker <anse@heidisql.com>, 1 month ago, revision 6358
Create editor commands for moving line up/down. See https://www.heidisql.com/forum.php?t=18926
ansgar's profile image ansgar posted 1 month ago Permalink

I adopted the one from https://forum.lazarus.freepascal.org/index.php?topic=40208.0 , plus additional safety checks, and gave them Alt+Up and Alt+Down. These two are not really SynEdit commands, but homebrown actions, and are manually placed at the end of the long menu Query > Editor commands.

byman64's profile image byman64 posted 1 month ago Permalink

Thanks a lot of your time, really appreciated.

are manually placed at the end of the long menu Query > Editor commands. Do your know how to add them?

I have a portable version of Heidi SQL and I don't see any editable files that contains the long menu.

Do your know how to do it?

ansgar's profile image ansgar posted 1 month ago Permalink

You need to update to the latest nightly first, through Help > Check for updates.

Afterwards, you should see new commands:

Description

It's just a bit cumbersome to reach them with the mouse, but as said they have keyboard shortcuts.

byman64's profile image byman64 posted 1 month ago Permalink

GREAT, it will be update my portable version?

byman64's profile image byman64 posted 1 month ago Permalink

I tried to update, and I find the nightly build in temp...just copied in my heidi sql folder...

I see the new Move line down/up...they works good.

Finally I can use this fantastic feature.

THANKS AGAIN FOR YOUR TIME AND YOUR QUICK REPLIES!

byman64's profile image byman64 posted 1 month ago Permalink

I am searching for another good and useful feature: columns selection.

In Notepad++, VS Code, SMSS SQL is available with ALT+MOUSE DRAG UP/DOWN OR ALT+SHIF+MOUSE DRAG UP/DOWN

I searched on internet but SynEdit seems has not this feature but there are some implementation like move line up/down.

I find some:

1# Column Mode in SynEdit

2# SynFacilUtils 1.24

3# SynEdit MultiCaret plugin

byman64's profile image byman64 posted 1 month ago Permalink

I find a way to make column selection but you cannot write a multi caret

SHIFT+CTRL+C + MOUSE UP/DOWN

Not much useful like this one:

1 attachment(s):
  • HEIDI-SQL-SynEdit-Column-Selection-multi-caret-edit

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.