coteditor / CotEditor

Lightweight Plain-Text Editor for macOS
https://coteditor.com
Other
6.24k stars 427 forks source link

specify syntax when opening a new document via cli, etc #1555

Closed danieljimenez closed 7 months ago

danieljimenez commented 7 months ago

Is your feature request related to a problem? Please describe.

I'd like to open a file from the cot commandline with the -w (wait) switch and also tell cot that it's a zsh/bash script, etc. This way I get syntax highlighting and the -w wait.

Describe the solution you'd like

A flag like -s/--syntax that allows me to pass in --syntax bash, etc.

Describe alternatives you've considered

I looked in the Applescript dictionary to see if this was possible, and it did not seem like there was anyway to set the syntax. Please correct me if I'm wrong and I can submit a PR to the cot command line repo.

Additional context No other context, I think that's everything.

1024jp commented 7 months ago

Thank you for the request. I've just squeezed --syntax option in the next CotEditor 4.7.0, which will be released this weekend ;).

I looked in the Applescript dictionary to see if this was possible, and it did not seem like there was anyway to set the syntax.

FYI, the property to set syntax in AppleScript is not "syntax" but coloring style due to historical reasons.

Screenshot 2023-12-06 at 20 10 27
danieljimenez commented 7 months ago

You're awesome. I love coteditor. Thanks for all your work.