mirror of
https://github.com/jbranchaud/til
synced 2026-01-06 16:48:01 +00:00
Add Whole Line Auto Completion as a vim til.
This commit is contained in:
@@ -79,6 +79,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
||||
- [Tabs To Spaces](vim/tabs-to-spaces.md)
|
||||
- [The Vim Info File](vim/the-vim-info-file.md)
|
||||
- [View Commit History of a File](vim/view-commit-history-of-a-file.md)
|
||||
- [Whole Line Auto-Completion](vim/whole-line-auto-completion.md)
|
||||
- [Wrap With Some Room](vim/wrap-with-some-room.md)
|
||||
|
||||
### zsh
|
||||
|
||||
16
vim/whole-line-auto-completion.md
Normal file
16
vim/whole-line-auto-completion.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Whole Line Auto-Completion
|
||||
|
||||
To get whole line auto-completion in Vim, you don't need a fancy plugin. It
|
||||
is built right in. There is a sub-mode of insert mode called *X mode* that
|
||||
allows you to do various kinds of special insertions. The `ctrl-x ctrl-l`
|
||||
binding corresponds to whole line completion. So, if you start typing a few
|
||||
characters and then (while still in insert mode) hit `ctrl-x ctrl-l` you
|
||||
will see a completed line that matches the initial characters you typed as
|
||||
well as a list of subsequent matches. You can cycle through the matches
|
||||
using `ctrl-n` and `ctrl-p` (going forward and backward, respectively).
|
||||
|
||||
The completion is done based on the configured completion sources.
|
||||
Generally, the completion sources will include the current buffer, other
|
||||
loaded and unloaded buffers, plus others. You can see which sources are
|
||||
configured with `:set complete?` and read more about the completion
|
||||
configuration at `:h 'complete'`.
|
||||
Reference in New Issue
Block a user