2

I am writing a translation and I have found myself translating the same words again and again. I would like to have a file where I could write all the common substitutions I am doing (and hopefully have the ability to add a new substitution rule easily). For example:

source code -> código fuente
computer -> ordenador
of the -> del
[...]

And to have a command which could allow me to lookup the current word under the cursor on this file and to substitute it if it was found.

It is important to notice that the word's context is irrelevant to me and that the substitution rules could affect more than one word.

How could I achieve this? Is there any built-in command or minor-mode doing exactly this?

Mario Román
  • 271
  • 2
  • 10
  • 3
    Apart from the "affect more than one word" part, this is what `abbrev-mode` does. Maybe something can be hacked together from that? – erikstokes Jul 02 '16 at 22:43
  • What is the question? – Drew Jul 03 '16 at 01:11
  • I have edited the question to write it explicitly, thank you. – Mario Román Jul 03 '16 at 15:18
  • A thesaurus tool like https://github.com/hpdeifel/synosaurus might get you close to what you are trying to accomplish. It doesn't look like there's a user thesaurus out of the box, but you can probably repurpose the wordnet backend + format for your purposes. – ebpa Jul 03 '16 at 16:08

0 Answers0