Вопрос

I installed emacs prelude in cygwin via the simple curl installation. I open a test.js file and try typing "document." to see autocomplete but nothing pops up. Admittedly I'm totally an emacs/prelude newbie, is there something else I should be doing to get it to autocomplete?

Это было полезно?

Решение

  1. Does your Prelude installation include library Autocomplete? And is that what you mean by "autocomplete"?

  2. Give a recipe showing what keys you hit and what you expected to happen vs what actually happened.

  3. Consult the Prelude manual.

  4. Ask the preluddites themselves (sorry; couldn't resist): emacs-prelude@googlegroups.com.

I see only a few Google hits in English for all three keywords: "emacs prelude autocomplete", and none of them mention using Prelude and Autocomplete together.

Другие советы

Your question is too general, I am assuming by auto-completion you mean

A popup that displays the possible completions for currently typed word and allows you select one of the candidates

Something like this

enter image description here

Last time I checked prelude did not come with such autocomplete but you can configure emacs to have this kind of completions. You will have to install a library that provides the completion UI, I know of three libraries that do this in emacs (ordered according to my familiarity with them)

1) auto-complete

2) company

3) completion-ui

You can install any one of these (auto-complete and company have a good a number of backends, I do not know much about completion-ui). If you are using emacs 24 this will be as simple as M-xlist-packagesRET, marking the package to be installed with I and then typing X (for auto-complete you will need to add melpa to your package archive, refer to the websites above for more on installation)

These will provide a basic completion interface. auto-complete by default offers words in current buffer for auto-completion. However for 'intelligent' auto-completion you will need to configure these to use a completion backend. This will vary according to the individual language you want completion (eg. jedi for python, tern for javascript, eclim for java etc), as such you will need to ask specific questions to get helpful answers.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top