imxiejie / ThinkVim

Vim configuration in the 21st century
MIT License
868 stars 106 forks source link

local mapping not getting sourced #126

Closed quisenbeje closed 4 years ago

quisenbeje commented 4 years ago

Problems summary

I have a key mapping in my local config, ~/.thinkvim.d/init.vim, which isn't getting applied unless I manually source the file.

nnoremap <Tab> za

When I open a file and press Tab I get a message at the bottom of the editor,

[coc.nvim] Selection range provider not found for current document

Environment Information

Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -ped antic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostic s-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.4 /src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

health#nvim#check

Configuration

Performance

Remote Plugins

terminal

tmux



## How to reproduce the problem from neovim startup (Required!)

### doesn't work
 1. add `nnoremap <Tab> za` to ~/.thinkvim.d/init.vim
 2. open file
 3. press Tab

result:
> [coc.nvim] Selection range provider not found for current document

### works
 1. add `nnoremap <Tab> za` to ~/.thinkvim.d/init.vim
 2. open file
 3. run `:source ~/.thinkvim.d/init.vim`
 4. press Tab

## Screenshot (if possible)
![scrn-2020-09-01-09-16-58](https://user-images.githubusercontent.com/1675985/91863606-e99c2380-ec34-11ea-848b-a0547a5d36dd.png)
glepnir commented 4 years ago

update .