Hello!
As I have solved part of this question, I have amended this text to include the partial solution. The remaining issue is: How to stop the capitalization after specific abbreviations, i.e. ‘i.e., etc. bf.’ and the like?
The solved part: How to automate capitalization after punctationmarks?
I found a suggestion here that did not fully work:
github dot com/SublimeText/LaTeXTools/issues/1217
After a lot of trial and error, I got it to work.
As suggested in the link, first make a new plugin:
Open Tools > Developer > New Plugin… , paste, and save in the (default provided) User directory:
import sublime_plugin
class InsertUppercaseCommand(sublime_plugin.TextCommand):
def run(self, edit, character=""):
self.view.run_command("insert", {"characters": character.upper()})
Open Preferences > Keybindings… and add this keybinding to your user binds:
{
"keys": ["<character>"],
"command": "insert_uppercase",
"context": [
{ "key": "selector", "operator": "equal", "operand": "text.tex.latex" },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(^|\\.\\s+|\\!\\s+|\\?\\s+|\\:\\s+)$" },
],
},
This solution works for new lines and these marks: ‘. : ! ?’. If you don’t want capitalized letters after new lines, you may use [\\.\\!\\?\\:]\\s+$
instead of (^|\\.\\s+|\\!\\s+|\\?\\s+|\\:\\s+)$
And lastly, I am not an expert in python and have very little coding experience, and I hope you’ll keep it in mind when answering.