I do a lot of text editing for work and there are some phrases that I have to type frequently. What’s the best way to quickly paste those phrases into a document using a shortcut or keyword? I mainly use Kwrite and Kate as i prefer plain text editors and need no formatting.
jlow (he/him) ( @jlow@beehaw.org ) 11•1 year agoCheck out Espanso, if you’re ok with something that is system-wide and not a text-editor:
TerkErJerbs ( @TerkErJerbs@lemm.ee ) 5•1 year ago+1 for Espanso. Great tool, use it every day.
d3Xt3r ( @d3Xt3r@lemmy.nz ) 3•1 year agoSeconded. I love that it works under Wayland too, unlike Autokey.
jlow (he/him) ( @jlow@beehaw.org ) 1•1 year agoYeah, the install is a bit more involved under Walyand bit it does work like a charm.
antsu ( @antsu@lemmy.wtf ) 1•1 year ago+1
mrh ( @mrh@mander.xyz ) English6•1 year agoIf I understand you correctly, this is trivial in emacs:
(defun insert-text () (interactive) (insert "your text here")) (global-set-key your-keybind-here #'insert-text)
You could make it a format string if it relies on data specific to some file or parameter. You could also make the keybind local to certain modes/files rather than a global keybind if you don’t want to pollute your keybind space.
cabhan ( @cabhan@discuss.tchncs.de ) 3•1 year agoDepending on the complexity, there’s also
abbrev-mode
: https://www.gnu.org/software/emacs/manual/html_node/emacs/Abbrevs.html
Daeraxa ( @Daeraxa@lemmy.ml ) 4•1 year agoPulsar (i.e. active fork of Atom) has a pretty comprehensive snippets package that comes bundled with the editor. Can be configured with some fairly simple
cson
, for example with Markdown:'.source.gfm': 'Hello Lemmy': 'prefix': 'helem' 'body': 'Hello Lemmy!'
You type
helem
then presstab
and it will expand toHello Lemmy!
when using the Markdown grammar (source.gfm
).
It can handle custom tab stops too so you can make a longer preformatted sentence with gaps to insert words which you can just tab through (the$1, $2, $3
).'.source.gfm': 'My custom snippet': 'prefix': 'mcs' 'body': 'My snippet stops here $1 and then here $2 and then continues $3'
You can even do multi-line snippets. For anyone wanting to try it out the docs are here
Pantherina ( @Pantherina@feddit.de ) 2•1 year agoKate snippets. If you download them you think “huh do I need to know XML or what?”
But just install the extension and everything has a nice GUI
bo5on ( @bo5on@lemmy.dbzer0.com ) 2•1 year agoAutokey?
beeng ( @beeng@discuss.tchncs.de ) 2•1 year agoCopyQ
Looks good, thanks!