I am trying to use vim on Mac OS X High Sierra for coding java. If I want to use auto-completion I have to press ctrl + n .
Is there a way to do it automatically (without pressing a key) but with a way to turn it off?
Vim doesn't come with autocompletion built-in; only manual completion.
If you want autocompletion you will need a plugin. A quick Google search will give you many to choose from.
The built-in completion has to be manually triggered. As there are several different key combinations (see :help ins-completion
; the fact that so many different ones are available is a side effect of Vim's mode-based model), you can choose the right one depending on the use case.
However, many users have gotten used to automatic suggestion of completion candidates, as many IDEs provide this.
In Vim, you have multiple options:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.