cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Formatting Commands

Open Mark-Phillipson opened this issue 1 year ago • 10 comments
trafficstars

Given that people use Cursorless for dictating normal text, would it be possible, if this is not already in the pipeline, to enhance the formatting commands in Cursorless.

Currently for example we have to say:

format title at [target]

Proposed New Commands:

title [target]
camel [target]
smash [target]
all down [target]
all up [target]
sentence [target]
hammer [target]
dotted [target]

This would make the commands more intuitive and easier to remember. Being able to combine some of the commands also could make sense. For example: dotted title [target]

Mark-Phillipson avatar Feb 05 '24 19:02 Mark-Phillipson

I'm hesitant due to the conflicts with the built-in formatters. For a start would be better to do "camel format <target>", but even that technically has conflicts

@AndreasArvidsson what are you currently using?

We should also expose format action in our Talon-side API so users can use whatever they want (https://github.com/cursorless-dev/cursorless/issues/492)

pokey avatar Feb 09 '24 13:02 pokey

camel form <target> https://github.com/AndreasArvidsson/cursorless-talon/blob/8d1108549f77e85dc746afbbd5ab4840542441dd/src/cursorless.talon#L18-L19

AndreasArvidsson avatar Feb 09 '24 14:02 AndreasArvidsson

camel form <target> https://github.com/AndreasArvidsson/cursorless-talon/blob/8d1108549f77e85dc746afbbd5ab4840542441dd/src/cursorless.talon#L18-L19

Interesting. Does it ever misfire or pretty reliable? I also wonder about DFA

pokey avatar Feb 09 '24 14:02 pokey

camel form <target> https://github.com/AndreasArvidsson/cursorless-talon/blob/8d1108549f77e85dc746afbbd5ab4840542441dd/src/cursorless.talon#L18-L19

Interesting. Does it ever misfire or pretty reliable? I also wonder about DFA

Not one hundred percent reliable, but that is true about a bunch of other commands I used daily. Personally I prefer it this way otherwise of course I would just revert to the default. DFA is fine

AndreasArvidsson avatar Feb 09 '24 14:02 AndreasArvidsson

Would you recommend it for default, or should we just add format command to api and add a recipe to wiki?

pokey avatar Feb 09 '24 14:02 pokey

Yes I think making this default would be reasonable. You should probably try it for yourself first?

AndreasArvidsson avatar Feb 09 '24 15:02 AndreasArvidsson

fwiw I've used the same as Andreas for months and rarely (if ever) have problems.

fidgetingbits avatar Mar 09 '24 08:03 fidgetingbits