If you do not want to install KDE dependencies to run Kate, I have found a solution that can work until the Scite implementation in GNU / Linux (?) Receives the “Copy as RTF” command, see here
So release:
sudo apt-get install wine synapse
wine: Windows emulator;)
synapse: quick application launch
download notepad ++ version for installation
go to Downloads, chmod +x executable file (permissions to execute, can execute graphically with file properties, in permissions)
install it! (with default values)
Now you can easily launch it using the synapse: if running: Ctrl + Space (or Super (window key) + Space ) and enter “notepad” (if not, press “Down arrow” and do a search!)
write the text, for example:
for i=1:3 %comment! end
and now select it, with the right mouse button "plugin commands> copy text with syntax highlighting"
insert it!
in LibreOffice Writer: be careful, use Ctrl + Shift + V or Edit> Paste Especial> Formated Text [RTF]
in Abiword works with Ctrl + V
Pedro source share