Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you type <C-x><C-o> in Vim?

Tags:

vim

go

What keys do <C-x><C-o> represent in Vim? My goal is to get autocompletions working for Golang.

I've installed this plugin and have the syntax highlighting working.

https://github.com/fatih/vim-go

The readme says that, "Autocompletion is enabled by default via <C-x><C-o>", but I don't know which keys to press.

like image 818
425nesp Avatar asked Jan 19 '15 09:01

425nesp


2 Answers

It's Ctrl+X, Ctrl+O. This combination is used in Vim for omnicompletion. Type :h omnifunc or :h ft-go-omni (I presume) for more information.

like image 186
Don Reba Avatar answered Oct 19 '22 01:10

Don Reba


  • go is executable?

    do you add path to golang into $PATH?

  • vim-go is loaded?

    if you are using vim-plug or pluggable interface for plugins, you should have vim-go in ~/.vim/bundle

  • are you editing go file?

    check :set ft? is go

like image 21
mattn Avatar answered Oct 19 '22 00:10

mattn