Switching settings depending on context (how I use CotEditor) #1371
Closed
little-flag
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Just wanted to say that the new features in 4.6.0 that answer this request are amazing. Thank you so much! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use CotEditor for both writing prose (in markdown) and editing code. It works great for both kinds of task. However, these different modes of writing require very different settings. For example, when writing markdown, I want
Check Spelling While Typing
andSmart Dashes
enabled. When I am editing code, however, the opposite is necessary.I am able to handle these settings with Keyboard Maestro. Whenever the front CotEditor window changes, KM reads the file extension of the front document and changes the settings if necessary. It sometimes gets confused when quickly switching between documents, but it generally works well. However, this obviously is only possible for settings that are exposed in the menu.
The main problem with my workflow, switching between writing markdown and editing code, is font. Code requires a fixed-width font. But I find this no good for writing markdown. Staring at thousands of words of prose, writing for hours a day (I'm writing a book!), requires a nice variable-width font, such as Avenue Next. And switching font in CotEditor isn't really possible to automate.
So, I have a feature request and a few further ideas. The main thing I'd like is to be able to switch fonts depending on context, just like my other settings described above. I think this could work a few different ways:
Alternatively, I have considered that I could perhaps keep installed two different versions of CotEditor, configured for the two distinct use cases. I guess I would need to change the bundle ID of the second app and prevent it from using the same preferences file. Seems possible, but it might be a pain to keep updated.
A final idea I have follows on from the above but is slightly different. Using Karabiner Elements, I am developing a Vim-inspired command mode keyboard layer for use with CotEditor (and other applications). The problem here is mainly with getting visual feedback to confirm which mode I am in at any one time. The traditional way that this is done in Vim/Emacs, etc. is to switch between a block-style cursor for command mode and a bar-style cursor for insert mode. CotEditor of course supports both styles but can only be switched from within Preferences.
Long story short: CotEditor is my text editor of choice because (a) it is beautiful, (b) it is extremely configurable, and (c) it is very easily configurable. It provides an almost perfect platform on top of which almost any text editing environment can be built.
Of course, my use cases may be idiosyncratic to me. However, by making more settings programatically configurable—I am particularly mentioning here font and cursor style, though there are others—CotEditor could be even more versatile and powerful.
Anyway, I hope that the above is at least interesting. I plan to share some of my scripts and things in future. I have a whole library for writing markdown in CotEditor, though it still needs some serious work before I make it public.
:)
Beta Was this translation helpful? Give feedback.
All reactions