I’m trying to be able to have groups that can each be deleted/treated independently, but can each contain multiple words. Is that possible to do with native CodeMirror code or do I have to implement that myself? I was thinking of using groups, or perhaps tokens, but I’m not sure how.
It’s unclear to me when a “group” (object?) is made. When I use “javascript” mode delGroupBefore seems to delete a whole line before the cursor, but when I use “text/html” mode delGroupBefore seems to delete just the part of the word that is before the cursor. I may be doing something wrong though. Edit: I must have been hallucinating. I’ve been testing again and in both ‘javascript’ mode and ‘text/html’ mode, the part of the word before the cursor is deleted. (Unless the cursor is after the last letter in the word, in which case, everything except the last letter is deleted, though I’m not sure why that is.)
Is it possible to manually trigger the creation of a group? Or manually trigger the creation of a new token (without having to create a mode)? Edit: In which case I guess I need to make my own code to delete tokens.