AlphaComplete : Insert mode completion based on any sequence of alphabetic characters.
| script karma
Downloaded by 330
Comments, bugs, improvements
script versions (upload new version)
The built-in insert mode completion i_CTRL-N searches for keywords. When you
want to complete from fragments of variables (e.g. "frobnicator" from
"m_frobnicator"), it won't work. Same when you have a keyword prefix before
your completion base (e.g. "_fro" won't find "frobnicator").
This plugin offers completion of sequences of alphabetic characters ([A-Za-z],
/\a), and therefore can complete from text fragments or when there are
non-alphabetic keyword characters in front of the completion base.
- Check out the CompleteHelper.vim plugin page (vimscript #3914) for a full
list of insert mode completions powered by it.
In insert mode, invoke the alphabetic completion via CTRL-X a
You can then search forward and backward via CTRL-N / CTRL-P, as usual.
CTRL-X a Find matches for whole fragments of alphabetic
Further use of CTRL-X a will copy the text including
the next alphabetic fragments following the previous
expansion in other contexts.
This script is packaged as a vimball. If you have the "gunzip" decompressor
in your PATH, simply edit the *.vmb.gz package in Vim; otherwise, decompress
the archive first, e.g. using WinZip. Inside Vim, install by sourcing the
vimball or via the :UseVimball command.
To uninstall, use the :RmVimball command.
- Requires Vim 7.0 or higher.
- Requires the CompleteHelper.vim plugin (vimscript #3914).
For a permanent configuration, put the following commands into your vimrc:
Analoguous to the 'complete' option, you can specify which buffers will be
scanned for completion candidates. Currently, '.' (current buffer), 'w'
(buffers from other windows), and 'b' (other listed buffers) are supported.
let g:AlphaComplete_complete = '.,w,b'
The global setting can be overridden for a particular buffer
If you want to use a different mapping, map your keys to the
<Plug>(AlphaComplete) mapping target _before_ sourcing the script (e.g.
in your vimrc):
imap <C-x>a <Plug>(AlphaComplete)
Click on the package to download.
ip used for rating: 22.214.171.124