Autocompletar de Emacs: agregue el diccionario existente a un modo principal

This seems fairly simple at first, but it's pretty frustrating. I'd like to assign existing autocomplete rules (ac-mode) to a major mode. E.g. recently I discovered sass-mode and I'd like to use css-mode dictionary for it. Surely I can just copy and rename the dictionary directory, but that's a pretty ugly (and inefficient) hack.

Any ideas how to mend this in a nice manner?

preguntado el 02 de febrero de 12 a las 10:02

Define "autocomplete"? I don't believe standard Emacs uses that terminology, so I'm not sure what you are referring to. -

Ah, sorry, I was referring to this one: emacswiki.org/emacs/AutoComplete -

what rules.? I think what you meant is sources. what sources you want to add.? dictionaries.?? -

Yeah, sry again for messed up terminology. I want to apply css-mode dictionaries to sass-mode, Desde Sass syntax is valid CSS sintaxis. -

Ah, nevermind, symlinking the dictionary file works like a charm. -

1 Respuestas

Well, I guess the "proper" way would be:

  1. Create a folder for the dictionary, e.g. ~/.emacs/dict
  2. Copiar y renombrar css-mode a scss-mode
    • css-mode can be fined in autocomplete package directory
  3. Añadir ~/.emacs/dict a ac-dictionary-directories

(add-to-list 'ac-dictionary-directories "~/.emacs/dict")

This method is useful because it allows you to add words to the dictionary file.

But I did otherwise. I just created a symlink scss-mode directamente en autocomplete/dict

Respondido el 09 de Septiembre de 15 a las 22:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.