Is there some shortcut to force ycm to re-run semantic analysis on the code. Eg. I get some error, I correct it and I want to check, but ycm on my machine refreshes only after about 5 secs. One way is to :w<Cr> :e<CR> but it saves the edits which I might not want. Is there some key binding to just refresh the semantic analysis result?

1 Answer 1


Did you try :YcmForceCompileAndDiagnostics?

Calling this command will force YCM to immediately recompile your file and display any new diagnostics it encounters. Do note that recompilation with this command may take a while and during this time the Vim GUI will be blocked.

nnoremap <F5> :YcmForceCompileAndDiagnostics<CR>

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.