Deoplete.nvim: Single 'd' deletes the line under cursor

Created on 7 Apr 2017  路  22Comments  路  Source: Shougo/deoplete.nvim

Problems summary

I am a new user. The behavior described below happens after enabling deoplete:
In normal mode (after insert) dd is not working as expected.
A single d will delete the line under the cursor.

Expected

I expect the line to be deleted after I type dd.

Environment Information

  • deoplete version(SHA1):
[vim@arch deoplete.nvim]$ git rev-parse HEAD
be8d03e547c5bbc00b93c453b04a64a767baba3f
  • OS:
[vim@arch deoplete.nvim]$ cat /etc/os-release 
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
ID_LIKE=archlinux
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
  • neovim version:
[vim@arch deoplete.nvim]$ nvim --version
NVIM 0.1.7
Build type: Release
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wconversion -O2 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.1.7/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui      
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
  • :CheckHealth result(neovim ver.0.1.5-452+):
health#deoplete#check
========================================================================
## deoplete.nvim
  - SUCCESS: has("nvim") was successful
  - SUCCESS: has("python3") was successful
  - INFO: If you're still having problems, try the following commands:
    $ export NVIM_PYTHON_LOG_FILE=/tmp/log
    $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
    $ nvim
    $ cat /tmp/log_{PID}
    and then create an issue on github

health#nvim#check
========================================================================
## Configuration
  - SUCCESS: no issues found

## Performance
  - SUCCESS: Build type: Release

## Remote Plugins
  - SUCCESS: Up to date

## terminfo
  - INFO: key_backspace terminfo entry: key_backspace=\177,

health#provider#check
========================================================================
## Clipboard
  - WARNING: No clipboard tool found. Using the system clipboard won't work.
    - SUGGESTIONS:
      - See clipboard.

## Python 2 provider
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Executable: /usr/bin/python2
  - INFO: Python2 version: 2.7.13
  - INFO: python2-neovim version: 0.1.13
  - SUCCESS: Latest python2-neovim is installed: 0.1.13

## Python 3 provider
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /usr/bin/python3
  - INFO: Python3 version: 3.6.0
  - INFO: python3-neovim version: 0.1.13
  - SUCCESS: Latest python3-neovim is installed: 0.1.13

## Ruby provider
  - SUCCESS: Found up-to-date neovim RubyGem
  - INFO: Ruby Version: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
  - INFO: Host Executable: /home/vim/.gem/ruby/2.4.0/bin/neovim-ruby-host
  - INFO: Host Version: 0.3.3

Provide a minimal init.vim with less than 50 lines (Required!)

call plug#begin('~/.local/share/nvim/plugged')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
call plug#end()

let g:deoplete#enable_at_startup = 1

The reproduce ways from neovim starting (Required!)

  1. Edit a multi-line file.
  2. Enter insert mode.
  3. Enter normal mode.
  4. Delete one line by typing a single d.

All 22 comments

I have been debugging what I think is the same issue since yesterday. For me, I noticed that replacing a word with ciw stopped working, and afterwards a single c clears the entire line. I can also reproduce the behavior described above with d.

I noticed the bug was not there when I checked out tag 2.0, so I ran a quick git bisect, which shows:

df577eeaab20f5cc63dd8e7f0e8e46833766b8d1 is the first bad commit

df577eeaab20f5cc63dd8e7f0e8e46833766b8d1

Right! tags/2.0 works for me too.

I am also experiencing this issue, so far only after Ctrl-c from insert to normal mode. I know that Ctrl-c does not emit the InsertLeave event which might be messing something up.

Also, I did a clean install two days ago and Deoplete was definitely working before then.

I cannot reproduce the problem in neovim 0.2.0.
I think you use neovim 0.1.7.
Please try neovim latest version.

I am also experiencing this issue, so far only after Ctrl-c from insert to normal mode. I know that Ctrl-c does not emit the InsertLeave event which might be messing something up.

OK. I get it.
Please don't use <C-c> to restore to the normal mode.

It looks like 0.1.7 is still the latest release and 0.2.0 is still pre-release.

I have fixed the problem. But... please don't use <C-c> in insert mode.
It does not trigger InsertLeave autocommand.

Okay cool. Thanks Shougo!

Oh, and I'm trying not to. Currently retraining my hands to use <C-[>.

I have fixed the problem.

It looks like 9a3c2ec8b464bcd4e840c565c45f2d67464c2eed did indeed fix the problem, but it has been reintroduced by the very next commit, bda6d16700d8d728ebd5d422d4936a5977c40273 (according to another git bisect).

So it won't work if we use <C-c>?

So it won't work if we use <C-c>?

It breaks some plugins state.
You should not use the mapping.

It breaks some plugins state.
You should not use the mapping.

I understand the limitation but this is kind of deal breaker. 馃槥

You can use the mapping.

inoremap <C-c>  <Esc>

It works.

heh. of course but it'd definitely confuse people who's trying to use my vim config for sure.

@shri3k Shouldn't confuse them too much, just add a comment: https://github.com/n8henrie/.vim/blob/3e32355bf04b97188909eeec38cc604cab0cf769/nvim.vim#L34

I am still seeing the same behavior (a single d in normal mode will delete the entire line), while using YouCompleteMe, even after removing my mapping for <C-c>. Disabling the plugin fixes the issue. I'm using NVIM v0.2.0 on Arch Linux. :cry:

I am still seeing the same behavior (a single d in normal mode will delete the entire line), while using YouCompleteMe

while using YouCompleteMe?
This is deoplete issue.
I don't understand.

Sorry, this seemed like a similar issue, so I elected to add a comment here rather then open a new issue. Would you like me to open a new issue for it? Or would you like more details?

You should create new issue.
Because the problem is already fixed.
Please see the issue template.

I am still seeing the same behavior (a single d in normal mode will delete the entire line), while using YouCompleteMe, even after removing my mapping for

Note: You must not exit insert mode by <C-c>.

And you must explain how to exit the insert mode.
This issue is terrible information. Because it does not explain how to exit. Just Enter normal mode.

Sorry, completely my fault. I commented on the wrong github repo.

Hm. If YouCompleteMe uses timers feature, it has the same problem.
You should not use <C-c>.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

letharion picture letharion  路  5Comments

nikitavoloboev picture nikitavoloboev  路  3Comments

ChristianChiarulli picture ChristianChiarulli  路  5Comments

tcstory picture tcstory  路  5Comments

callmekohei picture callmekohei  路  4Comments