Souk21,
Looking beautiful.
I notice how ever after ctrl-p most characters at least on a QWERTY
keyboard a shifted character
- > search/execute shift-"."
- < search/execute shift-"," * if we use this in future for macros << or
html <*
- ? help shift-"/"
- # search tags shift-"3"
- @ search tiddler with this tag shift-"3"
- [ filter operation unshifted
- *{ filter operation shift-"3" if we use this in future for
transclusions*
- + new tiddler (optional *@tags*) shift-"="
- | command palette settings shift-"\"
Now I was thinking if the *un-shifted character was available as an alias*
it may reduce the keys needed to invoke a command would reduce by one key
for many of the commands.
- However this may not be sustainable given we may want to use the
un-shifted characters in the command dialogue.
I mention this because perhaps this is the opportunity to see if the
shortcuts can become shorter, even just an alternative?
- eg ctrl-= Open command dialogue and feed in "+" (= shifted version) ie
"ctrl-p shift-+" four keys vs two needed.
- Of course this may vary with different keyboards, so perhaps
configured by the user
Regards
Tony
On Sunday, August 2, 2020 at 10:47:43 PM UTC+10, Souk21 wrote:
>
> New version 0.0.6 ! <https://github.com/Souk21/TW-commandpalette>
> Changelog:
>
> - [BREAKING CHANGE] Renamed field 'cp-hint' to 'command-palette-hint'
> for consistency
> - New shortcut commands for customization. Allow to call an action
> string from the command palette with any prefix of your choice. Choose a
> 'trigger' prefix that will override any other commands (even builtins like
> + or @). The input (minus the prefix) is then set as a variable
> <<commandpaletteinput>> for optional use in your action string (see
> example
> at the bottom)
> - actionString commands can now ask for user input. Set
> 'command-palette-user-input' field to 'true'. The input is then set as a
> variable <<commandpaletteinput>> for use in your action string. (see
> example at the bottom)
>
>
> @Diego Mesa: While I would like to do a rewrite and there are still some
> features I'd like to add, nobody complained about losing data yet.
> Another point that might change is the name, as some people think it's
> misleading in relation to TW's color palettes
> So I would say it should be safe to use, but is probably gonna evolve a
> bit before reaching 1.0 :)
> About core/plugins, I've never looked into the process, so I'm not sure.
> Thank you !
>
>
> @TW Tones: Thanks for the kind words!
> EditorMagic looks like a really nice addition!
> If I understand correctly, it would be some kind of autocompletion engine?
> It would indeed be nice for CP to be able to interact with it.
> It should be fairly easy when the data is available.
>
>
> @JD: Thanks a lot :)
>
> how do I access the text of the CommandPalette input box and have it
>> available to an actionString - type custom command?
>>
> It was not possible before, thanks to you, it now is :)
> You only have to add the field 'command-palette-user-input' to any
> actionString command and set it to true
> The command palette will ask for user input before invoking the
> actionString (with your hint if it's set)
> You can then access the input value with <<commandpaletteinput>> inside of
> your macro
>
> I tried looking at recently-modified tiddlers to see which one
>> CommandPalette modifies, but there's none!
>>
> Woops. I'm a bit ashamed, but for now CP does not use state tiddlers.
> Instead the state is stored in the DOM. I know it's not really in line with
> TW philosophy, but it's way easier for me to develop it like that. I'll
> definitely try to do it at some point.
>
> command-palette-hint contains the text of the hint informing the user of
>> what the command does (for example)
>>
> I reworked the hint system and it is now available to every command (where
> it makes sense)
>
> command-palette-popup-key can contain a key which, when inputted, will
>> reveal the submenu, in context of the current custom command
>>
> For preferences on how the text string will be parsed, I wish to access a
>> preferences page... So maybe by inputting "|" the submenu will open and
>> allow me to configure things
>>
> That's something I'd like to do in a next version, I'm still not sure
> exactly how, but I'll think about it !
>
> BTW, you can also create tiddlers with tags : '+title @tag @tag2'
>
> Let me know if those changes work for you!
> Thanks for the support :)
>
>
> @Saq Imtiaz Thanks a lot! I didn't know. That probably saved me quite a
> lot of time, and the solution is more elegant :) It's really nice of you,
> thanks again!
>
>
>
> EXAMPLES:
> Shortcut:
> command-palette-type: shortcut
> command-palette-trigger: =
> command-palette-hint: New Tiddler with name
> tags: $:/tags/CommandPaletteCommand
> title: $:/New Tiddler
> type: text/vnd.tiddlywiki
>
> <$action-sendmessage $message="tm-new-tiddler" title=<<commandpaletteinput
> >>/>
>
>
>
>
> actionString with user input:
> command-palette-type: actionString
> command-palette-name: New Tiddler with name
> command-palette-hint: Enter the name
> command-palette-user-input: true
> tags: $:/tags/CommandPaletteCommand
> title: $:/New Tiddler
> type: text/vnd.tiddlywiki
>
> <$action-sendmessage $message="tm-new-tiddler" title=<<commandpaletteinput
> >>/>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/53625b89-c95e-419d-b69d-838c072abfd2o%40googlegroups.com.