Wiki

by yszheda

View project onGitHub

Tip 111: Meet Vim's Keyword Autocompletion

Return to the top: <<Practical Vim>>

Autocompletion and Case Sensitivity

  • Vim's search command treats uppercase and lowercase letters as equivalent when the 'ignorecase' option is enabled.
  • Side effect: autocompletion also becomes case insensitive.
  • Solution: enabling 'infercase' option.

References:

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h 'infercase'

Triger Autocompletion

A Summary of Vim's Autocomplete Methods

Command Type of Completion
<C-n> Generic keywords
<C-x><C-n> Current buffer keywords
<C-x><C-i> Included file keywords
<C-x><C-]> tags file keywords
<C-x><C-k> Dictionary lookup
<C-x><C-l> Whole line completion
<C-x><C-f> Filename completion
<C-x><C-o> Omni-completion

References:

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h ins-completion