Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.53k stars 174 forks source link

Search across menus, actions and opened files #2293

Closed bahusoid closed 4 years ago

bahusoid commented 4 years ago

So basically I'm asking for Visual Studio Ctrl+Q functionality. It's also present in Notepad++ as NppMenuSearch plugin.

So there is no need to remember full menu structure - you can just open this search menu window type "utf" and search should find and and allow to execute all UTF related menus/actions like: File -> Encoding -> Convert -> Convert To -> UTF-8 and others.

Would be cool to have this functionality in CudaText.

Alexey-T commented 4 years ago

Cud already has Command Palette (F1 or Ctrl-shift-P), it does the similar thing.

bahusoid commented 4 years ago

Cool! Thanks for quick response and sorry for a poor job finding this functionality -seems pretty easily discoverable now :) Though it doesn't look for opened file names - can it be added to wish list?

Alexey-T commented 4 years ago

Good wish, cmd palette will show items “opened file: .......” since next version.

Alexey-T commented 4 years ago

Beta, pls try https://sourceforge.net/projects/cudatext/files/beta_version/

Alexey-T commented 4 years ago

@kvichans @dinkumoil

kvichans commented 4 years ago

What is new in "opened file:..."?

Alexey-T commented 4 years ago

@kvichans Command palette now has items “opened file: ...”

kvichans commented 4 years ago

what new the commands do?

bahusoid commented 4 years ago

Wow! That was really quick! I've tested it - seems to be working fine.

A bit unrelated - Home/End buttons don't move caret in search edit box to first/last position. Instead it reacts to list of search results - it kinda makes sense. But still would be good to have this ability in edit box. Maybe as Ctrl+ Home/Ctrl+End?

And another small wish is ability to quickly filter search to single group (like search only in menus, only in opened files, only in plugins, only in [some grouped items]) . In Visual Studio it's implemented by special prefixing search like @m searchString - search will be done only in menus. But ideally such filtering should also work with suffixes searchString @m.

@kvichans

Allows to quickly search across opened tabs by file name and switch to it.

kvichans commented 4 years ago

@bahusoid Thanks

Alexey-T commented 4 years ago

Made a change

Alexey-T commented 4 years ago

In Visual Studio it's implemented by special prefixing search

You can enter files: with ":" to make such a filter, or plugin: or lexer:. Do we need more prefixes?

bahusoid commented 4 years ago

Do we need more prefixes?

I've just start playing with Cuda so not sure. Will let you know if something comes to mind.

You can enter files: with ":" ... or plugin: or lexer:

Yeah I got it (actually files: doesn't work, it seems you meant file:). But it still gives many unrelated results and first suggested result is not for opened files. And in most cases I enter simply search string and only when I see too many results I want to apply additional filtering. So suffix filtering is much more convenient to me. But I understand it might be an overkill to implement such functionality here...

kvichans commented 4 years ago

I offer a short form:

Alexey-T commented 4 years ago

But I really like this idea

by special prefixing search like @m searchString - search will be done only in menus. But ideally such filtering should also work with suffixes searchString @m.

Alexey-T commented 4 years ago

@bahusoid @kvichans @dinkumoil I made this as hash-symbol plus letter: #l - lexers, #p - plugins, #f - files. on typing # Cmd Palette shows

Screenshot from 2019-11-19 12-26-19

then we can type string. Screenshot from 2019-11-19 12-27-52 Screenshot from 2019-11-19 12-28-06

Alexey-T commented 4 years ago

Screenshot from 2019-11-19 12-31-33 Screenshot from 2019-11-19 12-32-01

dinkumoil commented 4 years ago

Nice, I like it! :+1:

But what's about searching in the menu?

bahusoid commented 4 years ago

Yeah! Looks awesome. I also wonder how to make VIM like search results navigation...I think maybe Ctrl+H,J,K,L can be added as left, up, down, right alternatives in command palette?

Alexey-T commented 4 years ago

VIM navigation will be beyond editor scope (yes we have Vim Mode plugin but it's plugin).

Alexey-T commented 4 years ago

But what's about searching in the menu?

Why to search in menu, when all menu commands are already in CmdPalette?

Alexey-T commented 4 years ago

new beta: https://sourceforge.net/projects/cudatext/files/beta_version/

dinkumoil commented 4 years ago

Why to search in menu, when all menu commands are already in CmdPalette?

Menu entries are what users see all the time when working with the program. Command names and menu entry texts are not necessarily the same. But OK, the main menu can be customized by a plugin, I guess it would be really overkill to deal with that.

Thank you for the extensions you already made!

bahusoid commented 4 years ago

I've played a bit with it - no issues so far!

Regarding VIM navigation: I understand just thought as long Ctrl+J and Ctrl+K combinations are not usable anyway in command palette - would be cool to make it work as up/down keys to avoid additional hand frictions...

Alexey-T commented 4 years ago

done

OlehL commented 4 years ago

image

Alexey-T commented 4 years ago

@OlehL

OlehL commented 4 years ago

по пункту 2 нет подсветки совпадающих символов (как на предыдущем скрине синим) для лексеров, открытых файлов. Или так и планировалось?

Alexey-T commented 4 years ago

@OlehL Fixed, thanks