Optixal/neovim-init.vim

In the markdown file, the Enter key is different

ZhangPF2000 opened this issue · 1 comments

By using the configuration of this repo.
When I use neovim to edit the file, it will automatically complete.
This function comes from the COC.nvim plug-in.

Normal behavior

Use the tab key to select different options, and use the enter key to confirm the input

Like the following situation:
2021-08-13_20-29-52
When I press Enter key, it prints test

Actual behavior

For the above situation.
If this file is a markdown file (with .md as the extension)
When i press Enter key, it prints t, and it wraps


I am new to vim
I'm used to using the Enter key for completion.
So sometimes it’s more uncomfortable

$nvim --version
NVIM v0.4.4
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-eK2ojg/neovim-0.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-eK2ojg/neovim-0.4.4/build/config -I/build/neovim-eK2ojg/neovim-0.4.4/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-eK2ojg/neovim-0.4.4/build/src/nvim/auto -I/build/neovim-eK2ojg/neovim-0.4.4/build/include
Compiled by team+vim@tracker.debian.org

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

system message

Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-8-amd64
OS Type: 64-bit
Processors: 6 × Intel® Core™ i5-9400 CPU @ 2.90GHz
Memory: 15.6 GiB of RAM
Graphics Processor: llvmpipe

This behaviour is defined in the init.vim config file under coc.nvim:

inoremap <silent><expr> <TAB>

You can replace <TAB> with <CR>