New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor jumps around with completions #4
Comments
I think |
Interesting. I take from your response that it is not a great idea for a complete function to do that but I am not too familiar with them. Do you think I should look for a different complete function or that the problem should be handled by I searched the Vim source for |
It can't be fixed by in asyncomplete. The omni-func needs to be fixed. One temporary option would be to do this. Plug 'Shougo/neco-syntax'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-necosyntax.vim'
call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({
\ 'name': 'omni',
\ 'whitelist': ['*'],
\ 'blacklist': ['html'],
\ 'completor': function('asyncomplete#sources#omni#completor')
\ }))
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#necosyntax#get_source_options({
\ 'name': 'necosyntax',
\ 'whitelist': ['*'],
\ 'completor': function('asyncomplete#sources#necosyntax#completor'),
\ })) https://github.com/prabirshrestha/asyncomplete-necosyntax.vim I usually don't spend time in html much since I use react with typescript language server. There is a LSP for html but I haven't tried it yet. https://www.npmjs.com/package/vscode-html-languageservice For php I reocmmend using LSP. https://github.com/prabirshrestha/vim-lsp/wiki/Servers-PHP. LSP adds support for things like go to def, rename, find symbols, linting, code completion and much more. here is how my vimrc looks like. https://gist.github.com/prabirshrestha/279d8b179d9353fe8694/7a291666de64748efe32c24b13c9263198a4fe1c#file-vimrc-L178-L248. |
@casr might be good to start the discussion on https://github.com/vim/vim about |
Thank you both very much for your responses and suggestions. I think as the problem is isolated to a few filetypes I am quite happy to disable them for now. I could not get the @prabirshrestha thanks for a sharing your |
I have noticed an issue when using HTML where the cursor jumps away from where it should be. It also seems to corrupt the undo history making the change hard to undo. The issue is present in Vim and Neovim.
Here is a bare minimum
vimrc
to make testing easier:Use the command:
vim -u ~/minimalrc a.html
and then go into insert mode and type:You should notice that after typing 'a' the cursor jumps to the beginning of the line.
The text was updated successfully, but these errors were encountered: