History Report a problem
Article Edit this page Discussion

Ctrl-p - autocomplete

From Vim Tips Wiki

Jump to: navigation, search
 

[edit] Duplicate tip

This tip is very similar to the following:

These tips need to be merged – see the merge guidelines.

Tip 1257Previous TipNext Tip

Created: June 9, 2006 Complexity: basic Author: Shailesh Dave Minimum version: 6.0 Karma: 68/40 Imported from: Tip#1257


If you have a word typed into a file then for all the future typing for the specific word, one can use autocomplete by typing first few characters (minimum 1) and keep hitting Ctrl-p till you get the word you want.

For example, I had "foodyvar" and "funnyvar" already typed once in my current file then future type can be done with "f" Ctrl-p (till you get foodyvar). To save one stroke, you can also do "fo" Ctrl-p.

[edit] Comments

See also VimTip4, VimTip11, VimTip305


It will blow your mind to find out what Ctrl-n does.

Not to mention <C-x><C-p/n>. An enormous time and error saver.


It's completion that made me unable to use Visual Studio's editor (which has some completion, but it's not as good) anymore. I get lots of use out of:

File completion: <C-X><C-F>
Line completion: <C-X><C-L>
Omni completion: <C-X><C-O>


Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Terminator Wiki
Legend of Zelda Wiki
Flash Gordon
Everquest II Wiki
Yo-Yo Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for featured Wikia!

Send this article to a friend
"Ctrl-p - autocomplete"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation