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.

  • Daeraxa@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    9 months ago

    Pulsar (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 press tab and it will expand to Hello 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