views:

498

answers:

7

There's a lot of Text editors which support autocomplete during programming, but I want one which can autocomplete while typing normal text as I see a lot of repetition of words I type. Any emacs fans who have implemented this ?

A: 

vim has such a feature http://vim.wikia.com/wiki/VimTip4

i think ultra edit has a simmilar feature

danimajo
The link provided does indeed discuss an autocomplete extension for Vim, but describes it in terms of programming: "Completion such as this is also why it is a good idea to have *descriptive variable names*, so you can easily tell if you have the completion you were after".
pavium
A: 

I suspect there should not be any such text editor, a user can write just about anything, no editor can handle all and any sort of user input. Also it will create huge overhead; something not that much ideal.

For programming, it is ok because there are always limited number of keywords.

Sarfraz
I don't fully agree. I frequently type the same words while writing technical papers. And with the presence of AJAX enabled autocompleters in lots of websites these days, future users will get adept to auto-completion. The programming challenge is a different discussion and I would like to know them
iceman
@sarfrazI suspect you have never used emacs. or vim for that matter.
vedang
you are right vedang !
Sarfraz
+5  A: 

Try the builtin dabbrev-expand; it's bound to M-/.

Also see Predictive Mode if you fancy the more flashy stuff.

huaiyuan
I downloaded the package here : http://www.dr-qubit.org/download.php?file=predictive/predictive.tar.gz . How do i use it on emacs-23.1 for windows
iceman
Sorry I don't have easy access to an MS Windows environment to test it; last time I tried, the instructions on the Emacswiki page worked for me. I find autocompletion in normal buffer too distracting, so I use dabbrev only.
huaiyuan
pabbrev-mode is different from the one you were trying to download. See the link in my comment below.
Raja
+3  A: 

pabbrev-mode (predictive abbreviation) works by examining previously written text. Unlike dynamic abbreviation, the text is analyzed during idle time (which enables quick lookup of potential abbreviations). Pabbrev looks at word frequency to suggest the most common expression.

From the documentation, this is what it might look like as you typed the keys pred.

p[oint]
pr[ogn]
pre[-command-hook]
pred[ictive]
Raja
is this present in Xemacs as well
iceman
I dont use Xemacs, but I am pretty sure it should work there too.
Raja
Oh, <kbd> tag! Shiny!
ddaa
where is the .emacs file in windows (I'm using Emacs-23-CvsP091103-EmacsW32-1.58 )as mentioned here :To use it, download the source, and add this to your .emacs: (require 'pabbrev "/path/to/package/pabbrev.el") (global-pabbrev-mode)
iceman
finally got it working..thanks
iceman
+1  A: 

I love hippie-expand!

A: 

The Zeus editor has a non-programming auto complete feature (i.e. Alt + Space) that takes the current user input, searches the current file for words starting with that input and displays them in a drop down list.

jussij
A: 

You could set up auto-complete mode with a dictionary as your source. I have been very tempted to do this myself.

James Brooks