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 ?
Text editor with autocomplete while typing normal text
autocompleteemacsnotepadxemacs
Related Solutions
M-x find-name-dired
: you will be prompted for a root directory and a filename pattern.- Press
t
to "toggle mark" for all files found. - Press
Q
for "Query-Replace in Files...": you will be prompted for query/substitution regexps. - Proceed as with
query-replace-regexp
:SPACE
to replace and move to next match,n
to skip a match, etc. - Press
C-x s
to save buffers. (You can then pressy
for yes,n
for no, or!
for yes for all)
For Vim:
Vim has better integration with other tools (shell commands, scripts, compilers, version control systems, ctags, etc.) than most editors. Even something simple like
:.!
, to pipe a command's output into a buffer, is something you won't find in most GUI editors.A tabbed interface is not as nice as the "windowed" interface that Vim/Emacs give you. You can see two or more files at the same time side-by-side. The more you can see on-screen, the more you free your mind to think about your problem rather than doing mental bookkeeping of variable names and function signatures.
Don't underestimate the power of Vim regular expressions. There are a lot of Vim-specific extensions to match a specific column, a mark, the cursor position, certain classes of characters (keywords, identifiers) etc.
Integrated
diff
andgrep
(platform independent so you don't need to download and learn a new tool every time you change computers).Visual block mode (to edit columns) is something many editors lack, but that I can't live without. I have shocked and awed people at work using just this, making some edit in a few keypresses that someone would've otherwise spent ten minutes doing manually.
Multiple copy/paste registers. When you only have one, you end up going through strange contortions to avoid clobbering the clipboard. You shouldn't have to.
Vim's undo/redo system is unbeatable. Type something, undo, type something else, and you can still get back the first thing you typed because Vim uses an undo tree rather than a stack. In almost every other program, the history of the first thing you typed is lost in this circumstance.
Moving around, copying, pasting, and deleting text is insanely fast in Vim. The commands are simple, single keypresses, and composable. Add up all the times you do a careful, laborious mouse highlight and Ctrl-X, then replace them all with a
da(
(delete a set of matching parens and everything in them). It saves more time than you'd thinkThe little things, like
*
to search for the word under the cursor, or.
to repeat a command, or%
to bounce between an opening and closing paren. Way too many of these to list.Built-in scripting language and powerful key-mapping and macro ability so the editor can be extended in whatever ways you need. Tons of scripts already written and downloadable.
If you look closely enough, you'll find that even features that other editors also have, Vim often does better. All editors have syntax highlighting, but Vim has a syntax file for nearly every file format under the sun, often with lots of configuration options, and it's dirt-simple to write your own. Lots of editors handle different file encodings OK, but Vim gives you very specific and foolproof ways of setting file encodings and converting between them. The very first thing that impressed me about Vim is how perfectly it handles tab/space indentation options and Unix/DOS linebreaks compared to other editors that I had problems with at the time.
Many of these points apply equally well to Emacs (in different but usually equally-powerful ways).
Best Answer
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.