Triggering autocomplete in emacs-prelude - emacs

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?

Does your Prelude installation include library Autocomplete? And is that what you mean by "autocomplete"?
Give a recipe showing what keys you hit and what you expected to happen vs what actually happened.
Consult the Prelude manual.
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
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.

Related

VSCode-like integrated terminal functionality in nvim? (eg: open files mentioned in terminal output in a buffer)

I'm coming from VSCode to Neovim, and for the most part I've been able to accommodate/replicate the workflows and functionality I've gotten used to in VSCode in Vim. Right now, I'm stuck on replicating the Link functionality of the VSCode integrated terminal.
This lets you mouse over text like main.py or server.go:50 and ctrl-click to jump to that file or line location in your editor panes. This really helpful for jumping to the locations of compilation errors or test failures from their associated terminal output.
I've searched for existing plugins/solutions for this but haven't found any. Are there any that I've missed? Otherwise, what might be a good approach to scripting this myself?
I'm new to vimscripting, but I'd assume you could do some regex and with knowledge of the current working directory, you could infer the correct filepath to open.
Replicating one editor's workflow in another is not exactly a good idea as the two editors have—supposedly, if not why switch in the first place?—different feature sets or even paradigms. For instance, staying in insert mode all the time in Vim because that's what you are used to would make no sense because Vim derives most of its value from its modality… and you would probably also find examples in the other direction.
Case in point, compiling and jumping to errors in Vim typically doesn't involve the built-in :terminal at all. You are supposed to use the :help quickfix feature, which exists for that very purpose.
See :help 30.1 for a gentle introduction from the user manual.

is an advanced Python completion possible with Sublime Text 3?

I would like to have a completion in Sublime Text 3, for Python code documents, that would:
Complete the actual object method and other properties (like e.g.: os.path.isd → os.path.isdir without any previous occurence of the word isdir in the document).
Complete the general set of all document's words with a second, lower priority ↔ i.e.: have them listed them after the actual methods.
I would also like to see ST letting the words appearing nearier from the completion point to appear higher in the completion popup window.
Basically, I would like to have a completion resembling the Vim's CoC for C++ in its general features.
Is this possible? If yes, then what should be done to configure Sublime Text 3 for such coimpletion?
The behavior after installing the Python Completions package is far from perfect — all it does is apparently changing the priorities of the basic completion sources (after adding some that i didn't identify), so that it's worse than the shipped original' completion.
The Anaconda package (not at all related to the Anaconda Python distribution) does most of what you're looking for. You may also want to take a look at the LSP package as well.
It's upto you.
You can choose any plugin you like and your computer can support.
Just search the internet about the best python auto-complete.If you feel one of them is best suited for you, search in the package discoverer of Sublime Text for that name. If there is a plugin, install it or read the instructions,etc.
But I heard of some like Kite and Jedi.

Plain text autocomplete in Atom (Github)

I've auto-complete and auto-complete+ installed on the latest version of Atom. Unfortunately, these packages don't auto-complete or suggest words while typing plain text as open office or some sublime packages do.
For instance, if I am typing repo and the word repository already appears in the current document, I would like to have some sort of auto-completion / intellisense to show up.
I looked, in vain, for package in atom achieving that.
So, the question is, do you know any package to do that in atom or any intuitions on how to create it ?
Thanks.
Actually the autocomplete-plus package should do exactly what you want. By default it looks in the current document, but you can enable "Include completions from all buffers" to get completions from all open buffers.
A few suggestions why it does not work:
Make sure "Enable built-in provider" is activated in the autocomplete-plus settings
The package let's you choose between two "Default Providers", Fuzzy and Symbol. Try both (for me Symbol works fine)
Make sure the file type you use does support autocompletion and is not blacklisted, see this question for details
Maybe the autocomplete package interferes with autocomplete-plus. Try disabling or uninstalling autocomplete

Activating text editing macros on Netbeans

This question was asked on Super User but I didn't get any response so I moved it here...I believe it is relevant and important...
I've been using Netbeans on Mac OS X for sometime it has some really good features but it doesn't support most of the macros and that sucks. I'm not only talking about complicated emacs macros but even the most basic are not supported like C-e for the end of the line or C-a for the beginning of the line.
Can somebody help to activate macros ?
I'm not sure if you really mean macros. When I think of macros, I think of a series of commands and keystrokes being issued. In any case, single commands (shortcuts) like the ones you mention (end of a line and beginning of a line) are certainly supported by Netbeans by default with the home and end keys. You can replace those with the key combinations of your choice or add them as alternates.
In fact, Netbeans allows you to create entire profiles of shortcuts and ships with one for Emacs users and contains the exact shortcuts you mention. This functionality is accessed from the Tools > Options menu, Keymap tab.
If you are looking for actual macro capability, that is supported in Netbeans as well. You might have to do some digging for documentation and Netbeans only comes with 3 build in macros. You can define them directly or have Netbeans record your activities to a macro. Macros can be accessed from Tools > Options menu, Editor > macros tab.
Netbeans supports templates as well, which are pieces of predefined code or text that can be generated by entering an abbreviation in the editor and then hitting tab.

How to Make Eclipse More Like Emacs

I am very familiar with emacs--and I realize that there is nothing that it cannot do--but there are some things that it does not do well or efficiently. So, being between projects I am open to the idea of switching to a full-featured IDE such as Eclipse.
With muscle-memory being what it is, I would like to make Eclipse as emacs-like as possible. I have already discovered the excellent Emacs+ plugin which gets me about halfway there. However, I am still missing the following features of emacs which I routinely rely upon:
shell: It's not just a shell, it's also a buffer.
occur: Search->File... is close to what I want, but I just want it to search the current file--which might be a text file, a logfile, or a shell buffer, or whatever.
align-regexp: This awesome little command in emacs helps me make files more readable, and alignment helps with keyboard macros.
What plugins would you recommend to solve these issues? Are there any other emacs features you miss in Eclipse or plugins you would recommend?
Please, no emacs/vi zealots asking why on Earth I would do such a thing.
For the shell you have WickedShell
Ctrl+F is enough to trigger a Search within the current file. (does not create a new buffer with matched lines)
Only Mark Occurrences is about highlighting occurrences, but that is not as advanced as the Emacs function.
Formatter options can emulate "align-regex" function, as described here.
Preferences -> Java -> Code Style -> Formatter.
Click 'Edit' on the profile (you may need to make a new one since you can't edit the default).
In the indentation section select 'Align fields with columns'.
Then, in your code Ctrl+Shift+F will run that formatter.
I can confirm Brian's suggestion (Emacs key-bindings). What I do to resolve this dilemma is to use both Emacs and Eclipse simultaneously. They are both very good at reporting external changes to files so there is minimal chance of tromping on edits (but it can happen). More to the point, you can leverage the strengths of both tools without having to give up either one. The combination of using both tools and Eclipse having Emacs key-bindings makes this quite satisfactory for me.
IIRC (It's been a while since I've used eclipse) eclipse has a "use Emacs key-bindings" mode. I believe that there's also the option to tell eclipse to use emacs as its own editor...