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.
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.
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
Do u execute ":GoInstallBinaries" in the vim?
And the bin path is add?
ps:
The default keybind is complex,
I recommend using neocomplete.vim by Shougo and add follows on the base configuration:
let g:neocomplete#sources#omni#input_patterns.go = '\h\w*\.\?'
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
function! s:my_cr_function()
return pumvisible() ? neocomplete#close_popup() : "\<CR>"
endfunction
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"