Why does one of Vim's autocomplete functions (ctrl+n) not work in html documents, while the other (ctrl+p) still does?
1 Answer
ctrl-p
and ctrl-n
does work in html
documents in VIM8
. Its probably something to do with a setting in your vimrc
or one of the plugins.
Steps:
- get a HTML document with:
wget http://www.lsu.edu/OCS/html-tutorials/writingHTML/tut/tut1.html
- load vim without plugins using
vim -u NONE
- open the
tut1.html
file that you just downloaded. - use
ctrl-p
orctrl-n
and you will see that it works.
To debug:
do a binary search: break up the number of plugins and their settings you have into 2 parts.
add one set back in your vimrc, and check if you can
vimrc
and default location. (if you are usingVundle
, you can just comment out the lines in yourvimrc
to not load those plugins and their settings. If you are using Pathogen, move the 2nd set of plugins to a different location and comment out the settings corresponding to those plugins in yourvimrc
.)If you can reproduce the problem, do a binary search in those plugins following steps #1,2
If you cant reproduce the problem in step#2, go to the next set of plugins and their associated settings and repeat step #1-3.