Why does one of Vim's autocomplete functions (ctrl+n) not work in html documents, while the other (ctrl+p) still does?

1 Answer 1


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.


  1. get a HTML document with: wget http://www.lsu.edu/OCS/html-tutorials/writingHTML/tut/tut1.html
  2. load vim without plugins using vim -u NONE
  3. open the tut1.html file that you just downloaded.
  4. use ctrl-p or ctrl-n and you will see that it works.

To debug:

  1. do a binary search: break up the number of plugins and their settings you have into 2 parts.

  2. add one set back in your vimrc, and check if you can vimrc and default location. (if you are using Vundle, you can just comment out the lines in your vimrc 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 your vimrc.)

  3. If you can reproduce the problem, do a binary search in those plugins following steps #1,2

  4. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.