vi and Vim Editors Pocket Reference by Arnold Robbins

vi and Vim Editors Pocket Reference by Arnold Robbins

Author:Arnold Robbins [Arnold Robbins]
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Programming / General
ISBN: 9781449392185
Publisher: O'Reilly Media
Published: 2011-01-10T16:00:00+00:00


foldtext (fd) foldtext()

Insertion Completion Facilities

Vim provides completion facilities: the ability to enter only a part of the final text and have Vim provide you with a list of suggested completions based on the commands you use and the content of the current files.

The completion commands (except for completion with the complete option) are two-keystroke combinations that start with CTRL-X. Most second keystrokes are not bound to actions in input mode, so it is often useful to map the second keystroke to the original combination, such as :inoremap ^F ^X^F.

The completion commands present a list of choices that you can cycle through using CTRL-N and CTRL-P (for “next” and “previous,” respectively). Use CTRL-E to end the completion without making a choice, and use CTRL-Y or ENTER to select the current choice and insert it.

The completion facilities are not simple, but they bring considerable power and time savings to long editing sessions. It is worthwhile to invest time to learn to use them. See Chapter 14 of Learning the vi and Vim Editors for the details.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.