Vim Autocomplete

ctrl+n and ctrl+p are the autocomplete commands in vim.

Was looking for this as I’m spending a lot of time in Vim today. Google led me to:

Consider you have following file contents.

RewriteCond %{REQUEST_URI} /somefilepath1/.*
RewriteCond %{REQUEST_URI} /somefilepath2/.*

Now if you want to add another RewriteCond, and you have reached till “Rewri”

All you have to do is press Ctrl+P, Vim will automatically add “teCond” to the string “Rewri”

via http://bit.ly/VHElJ

Notes