tversteeg / registers.nvim

📑 Neovim plugin to preview the contents of the registers
GNU General Public License v3.0
601 stars 23 forks source link

Ctrl-R not working in insert mode if not in the beginning of lines. #99

Open chunxuan-hs opened 1 year ago

chunxuan-hs commented 1 year ago

Please select which platform you are using

Mac

Was this something which used to work for you, and then stopped?

I never saw this working

Describe the bug

In insert mode, if the insert position is not in the beginning of lines, when I press c-r, it only shows ", but no popup windows. In normal mode it works no matter it is in the beginning or in the middle of lines.

Neovim version

NVIM v0.9.0 Build type: Release LuaJIT 2.1.0-beta3

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.0/share/nvim"

Run :checkhealth for more info

Setup

require'registers'.setup()
tversteeg commented 1 year ago

Do you have a config file available? Maybe some other plugin is causing this.

chunxuan-hs commented 1 year ago

Thanks for the prompt reply!

Actually I have quite a few, and I not sure how to debug. As far as I could tell, none of them use the kep mapping of ctrl-r.

Here are the lists:

Plug 'neovim/nvim-lspconfig'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'kyazdani42/nvim-web-devicons'
Plug 'justinmk/vim-sneak'
Plug 'b3nj5m1n/kommentary'
Plug 'junegunn/vim-easy-align'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround'
Plug 'arecarn/vim-fold-cycle'
Plug 'sbdchd/neoformat'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'lfv89/vim-interestingwords'
Plug 'kshenoy/vim-signature'
Plug 'itchyny/vim-cursorword'
Plug 'yuttie/comfortable-motion.vim'
Plug 'windwp/nvim-autopairs'
Plug 'Shougo/ddc.vim'
Plug 'Shougo/ddc-filter-matcher_length'
Plug 'vim-denops/denops.vim'
Plug 'LumaKernel/ddc-file'
Plug 'matsui54/ddc-buffer'
Plug 'Shougo/ddc-ui-native'
Plug 'Shougo/pum.vim'
Plug 'Shougo/ddc-ui-pum'
Plug 'Shougo/ddc-nvim-lsp'
Plug 'Shougo/ddc-filter-sorter_rank'
Plug 'matsui54/ddc-matcher_fuzzy'
Plug 'matsui54/ddc-converter_truncate'
Plug 'matsui54/ddc-ultisnips'
Plug 'Shougo/ddc-around'
Plug 'Shougo/ddc-mocword'
Plug 'ccshao/ddc-source-rg'
Plug 'Shougo/ddc-source-codeium'
Plug 'matsui54/denops-popup-preview.vim'
Plug 'matsui54/denops-signature_help'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'tversteeg/registers.nvim'
Plug 'itchyny/lightline.vim'
Plug 'mengelbrecht/lightline-bufferline'
Plug 'teranex/jk-jumps.vim'
Plug 'alok/notational-fzf-vim'
Plug 'tpope/vim-eunuch'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'AndrewRadev/splitjoin.vim'
Plug 'preservim/vim-markdown'
Plug 'ojroques/vim-oscyank', {'branch': 'main'}
Plug 'kdheepak/JuliaFormatter.vim'
Plug 'junegunn/goyo.vim'
Plug 'jkramer/vim-checkbox'
Plug 'nvim-neo-tree/neo-tree.nvim'
Plug 'MunifTanjim/nui.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'kevinhwang91/nvim-bqf'
Plug 'Valloric/ListToggle'
tversteeg commented 1 year ago

That's quite a lot indeed. What does :imap print?

chunxuan-hs commented 1 year ago

It looks <c-r>is used by registers.

i  <BS>        *@v:lua.MPairs.autopairs_bs()
i  <M-e>       *@<Esc>l<Cmd>lua require('nvim-autopairs.fastwrap').show()<CR>
i  "           *@<Lua 18: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  '           *@<Lua 17: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  (           *@<Lua 15: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  )           *@<Lua 16: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  [           *@<Lua 13: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  ]           *@<Lua 14: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  `           *@<Lua 12: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  {           *@<Lua 10: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  }           *@<Lua 11: ~/.config/nvim/plugged/nvim-autopairs/lua/nvim-autopairs.lua:261>
                 autopairs map key
i  <SNR>45_EunuchNewLine & <C-R>=EunuchNewLine()<CR>
i  <C-Tab>     * <C-R>=UltiSnips#ListSnippets()<CR>
i  <C-J>       * <C-R>=UltiSnips#ExpandSnippetOrJump()<CR>
i  <Plug>(fzf-maps-i) * <C-O>:call fzf#vim#maps('i', 0)<CR>
i  <Plug>(fzf-complete-buffer-line) * fzf#vim#complete#buffer_line()
i  <Plug>(fzf-complete-line) * fzf#vim#complete#line()
i  <Plug>(fzf-complete-file-ag) * fzf#vim#complete#path('ag -l -g ""')
i  <Plug>(fzf-complete-file) * fzf#vim#complete#path("find . -path '*/\.*' -prune -o -type f -print -o -type l -print | sed 's:^..::'")
i  <Plug>(fzf-complete-path) * fzf#vim#complete#path("find . -path '*/\.*' -prune -o -print | sed '1d;s:^..::'")
i  <Plug>(fzf-complete-word) * fzf#vim#complete#word()
i  <C-G>S        <Plug>ISurround
i  <C-G>s        <Plug>Isurround
i  <C-S>         <Plug>Isurround
i  <Plug>ISurround * <C-R>=<SNR>23_insert(1)<CR>
i  <Plug>Isurround * <C-R>=<SNR>23_insert()<CR>
i  <S-Tab>     * pumvisible() ? '<C-P>' : '<C-H>'
i  <C-H>       & codeium#Accept()
i  <C-R>         <Lua 9: ~/.config/nvim/plugged/registers.nvim/lua/registers.lua:920>
i  <C-L>       * <Esc>
i  <C-W>       * <C-G>u<C-W>
                 Nvim builtin
i  <C-U>       * <C-G>u<C-U>
                 Nvim builtin
i  <Tab>       * pumvisible() ? '<C-N>' : (col('.') <= 1 || getline('.')[col('.') - 2] =~# '\s') ? '<Tab>' : ddc#map#manual_complete()
i  <CR>        & EunuchNewLine(v:lua.MPairs.completion_confirm())
i  %%          * %%<Esc>i