乐闻世界logo
搜索文章和话题

How to use Vim's auto-completion feature?

2月21日 15:12

Vim's auto-completion feature can significantly improve coding efficiency. Completion triggers: Ctrl+n or Ctrl+p to trigger word completion in insert mode, Ctrl+x Ctrl+l for whole line completion, Ctrl+x Ctrl+f for filename completion, Ctrl+x Ctrl+] for tag completion. Completion types: word completion, line completion, filename completion, tag completion, dictionary completion, spelling suggestions. Completion settings: :set completeopt=menu,preview to set completion options, :set dictionary=/path/to/dict to set dictionary file, :set thesaurus=/path/to/thesaurus to set thesaurus. Plugin completion: using plugins like coc.nvim, YouCompleteMe, deoplete can achieve more powerful intelligent completion, including syntax awareness, function parameter hints, path completion, etc. Auto-completion combined with plugins can approach IDE completion experience and greatly improve development efficiency.

标签:Vim