Command Palette

Command Palette

VS Code is equally accessible from the keyboard. The most important key combination to know is Ctrl+Shift+P, which brings up the Command Palette . From here, you have access to all of the functionality of VS Code, including keyboard shortcuts for the most common operations.

The Command Palette provides access to many commands. You can execute editor commands, open files, search for symbols, and see a quick outline of a file, all using the same interactive window. Here are a few tips:

Now that the Command Palette (see above has become a normal UI feature for power users & developers across some apps (vscode, sublimetext, some pythonide, jupyterlab ...etc i think), I think that given a powerful program like directory opus with so many hidden tools, a command palette would be of great use.

Dopus has already has great support with the > and @ shortcuts in the FAYT bar (is there another name for that widget?)
But what it lacks is the quick filtering ability and taking the action immediately.

I find myself going to the Keys tab in the customize bar to find shortcuts for things I want to do.


It has a great filter option (the best! allows to filter by keys as well, haven't seen it anywhere else yet) and search options , so it's almost the perfect solution.
However, it still requires multiple clicks/and or keystrokes to activate, and you cannot execute the function immediately.

A modern command palette serves 3 distinct purposes as far as I can see

  • Discovery of commands/features based on what you want to do (i.e. duplicate a file? export a tree view ? create a timestamped zip ? ...etc.)
  • Discovery of shorcuts
  • Executing commands that have no obvious visual interface or is deeply nested somewhere and would require a few clicks. Or for the lazy who type faster then move the mouse and click and don't remember the shortcuts.

The way I see human memory works, is by associating which is the basic dictionary object (key, value). And our intent also is directly related to the action we want to take. Typically in any software a user has to learn to map his intent to the learned behavior of steps to execute in the software to achieve their aim. (let me know if I can explain all this better). I find that the command palette shortcuts this approach and allows a faster learning/doing experience.

I personally find it easier to remember words and actions of what I want to achieve than the steps I need to do to make it happen, so often I have to google up the exact recipe and execute it manually. However, a command palette assists with that greatly and reduces the effort required to do things. Google has also greatly influenced people to move away from structured information to queriable(?)/searchable information. I have also always thought that the command line was great for executing when you know what you want, and UI is great for discovery.

I think dopus has a great system in place, it's just a matter of unifying it and then making it easily accessible (preferrably with the Ctrl+Shift+P shortcut)
The reason I thought of this today was because I came across fman

The quickest way to explore fman's shortcuts is via the Command Palette :

Simply press Ctrl+Shift+P (or Cmd+Shift+P for Mac) in fman to open it.

And I thought it would be great to have this feature in my favorite file explorer. It would also greatly reduce the need for me to create custom toolbars, as I can quickly type what I want then to recall where exactly this command was in the custom toolbar I created. a quick e.g. is the diff toolbar i suppose.

So please consider my proposal!

let me know if it exists and I have stupidly ignored it all this time or if you decide to implement it when we can expect it.

I wouldn't mind a fully toolbarless dopus experience with the discovery & execution capabilities of a command palette.

As for far in the future, we are moving from learning behaviors to just dictating what we want and let the software figure it out, this is what all this assistant stuff is for I think.

Please upvote this post if you agree!

9 Likes

As a power user I also love this universal command palette in VS Code or other apps.

I'm new to Directory Opus and I agree that because there's so many options avaible in this app a command palette will be a great enhancement.

For beginners to find functionnality and in day to day to access to less used functions

The Customize dialog has a basic list of commands in it:

As does the button/hotkey editor in Simple mode:

It's not a complete list because every combination of possible commands and arguments would add up to an infinite list.

The button/hotkey editor in Advanced mode gives you menus with which to add commands and arguments to build things up:

That, and the manual which describes exactly what they do, are the best ways to discover everything you can do. That gives you far more scope than a simple list of commands.

(Once you add a command to the editor in Advanced mode, push F1 while on the same line to open the manual page for that command and its arguments.)

VS Code must've improved a lot since I last looked at it, when it didn't even have a configuration UI and the Settings menu item just opened a configuration text file. :smiley:

I wholeheartedly agree with your statement @Leo that all the features exists as is in Dopus, but like i mentioned it requires too many clicks/actions to reach the point where you can execute the task. The lookup/execute are 2 independent actions. Whereas with the proposed command palette it's a single action. It has to do with cognitive load when engaged in executive actions. Switching contexts mentally just to figure out something is jarring, and takes you out of flow.

2 Likes

Thanks for your reply and sharing your point of view. I recommend to try out what Vijay proposed, either in VSC or fman.

Other options to experience this functionality are Sublime Text (text editor, here, it's called Command Palette) or the IDEs from JetBrains (All Developer Tools and Products by JetBrains, e.g. CLion, or IntelliJ IDEA, here, it's entering Shift twice), or - at OS level - Wox (http://www.wox.one/).

The thing is, that it's not about exploring available commands or manually selecting things with the mouse or a memorized shortcut, but get the ability to enter some text and quickly execute a command. Think Google for commands.

It seems this comes in especially handy for developer/admin people used to enter commands at the terminal and I would love to have that functionality, too.

You really must have tried it to understand what is meant.

1 Like

a plus 1 to this feature request, which I found after looking for an alternative to the ~100 Dopus shortcuts I have—it's too many to rememver. Even if there was a way to build out own palette, it would be so helpful than clicking through menus.

2 Likes

I easily implemented my own version of this and it works really well for me.

Using the DopusRT command line tool which has access to all of Directory opus commands as the engine, its quite fast too.

I use keypiranha as the launcher, which I found by far to be the best launcher with direct integration capabilities through python.

Of course you have to predefine all the commands from scratch but it grows with my needs.

Thats what I like with Opus, it doesn't get in your way, sometimes it will even egg you on.

would you be willing to share your keypiranah config? I can set it up and see what I can do with it, but am not super familiar with the commandline tool!

saw this recent article on how / why palettes are popping up everywhere now The History of Command Palettes: How Typing Commands Became The Norm Again | Capiche

There's an infinite number of possible commands. That must have taken a long time. :slight_smile:

FWIW, we have plans for easier interactive use of commands/arguments.

2 Likes

@Leo Sorry I meant just define the commands that I need and adding more as I go on.

FWIW, we have plans for easier interactive use of commands/arguments.

This is great to hear, scrubby search of open tabs, aliases and filter bar scrubby search would be so great to have :innocent:

@brimwats
Sorry, I really cant as it has some sensitive data and its too bloated for me to try and censor it.

There are many ways to go about what you want to do, so long as your command bar tool can accommodate you.

One easy way is just to save .dcf files inside some folder and have keypiranha execute them, this is how I started. It does not require you to know Cli at all.
You create .dcf files by dragging any opus button on to a folder while in customise mode, name it appropriately so you can find it.

If you want to take it further then checkout
Keypiranhas Docs, really well written and two example packages of integrating your external tools
Also their Chat room where the dev is always taking questions, you can also find many examples in that same chat room.

Lastly their Github is great too. Its mostly an open source project so just reverse engineer some of its packages found here

PS: That article was a great read, thanks!

I'm not sure what that means. Please start a thread with details if you want us to consider it.

1 Like

The only thing missing from Dopus I think.

Customize > Commands, which is greatly expanded in 13.

I see custom >> commands but I don't see a way to take the "Search Commands" and make it a toolbar search bar or a popup palette. Am I missing something? Even then I'm not sure it would be contextually aware and only run commands like "play media" on an audio file vs "edit text" on a text file.

An example of how a palette would be used is, say I have several files selected. I would then press cmd+print and begin typing. Say I wanted to copy files to the destination lister. I would start typing and several matching commands would come up, like copy copy pathnames copy as, etc. (I think this is what @asgeirtj means by scrubby search, etc.)