Removing Text Formatting: Bold/Italics/Underscore
See original GitHub issueGreat plugin, by the way. I love being able to use my idea keybinds 😃
I was hoping you could provide some insight on a great way to quickly bold/italic/underscore text in a tex doc.
What I have done
I wrote a Live Template that does this 20% of the way to where I want it. I wrote the following template(s):
\textbf{$SELECTION$}$END$
\textit{$SELECTION$}$END$
\underscore{$SELECTION$}$END$
These work as advertised. They surround the current selection with the appropriate command and then move the cursor to the end for consistent behavior. Not sure if I like it yet, we shall see about that.
To expand these the following commands on windows keystrokes are required: ctrl + alt + t
i/b/u
(pick your poison).
What i would like
In a perfect world, I would love to be able to ctrl + i/b/u
, and have IDEA follow some predictable behavior to apply and\or remove the requested formatting.
Realistically, I would love to just use fewer keystrokes to only apply the format, and manually remove it as needed. Maybe ctrl + b
to add, ctrl + shift + b
to remove?
Issue Analytics
- State:
- Created a year ago
- Comments:12 (7 by maintainers)
Good point, it does work but it is a little too strict in what it accepts. I think it would be better to replace
.takeIf { it >= 0 }
by.coerceAtLeast(0)
inClipboard:17
and handle failures later on.If you change that, you can even paste tables like these ones: https://en.wikipedia.org/wiki/Prime_number#Primality_testing_versus_primality_proving
It would do the trick in the most simple case, but of course you can make it as complicated as you want, you can always find infinitely more cases in which it won’t work. That’s why I usually start with a very simple implementation, and if it turns out people are actually using it and requesting more advanced functionality I will expand it.
Good question, if it is it might be similar to our TablePasteProvider which converts an html table in the clipboard into a LaTeX table.
That would be great! Let me know if you need any help, for example to get started or if you cannot find certain functionality.