Vscode-neovim: Can't paste text from register / (Ctrl-r,/)

Created on 25 Sep 2020  路  6Comments  路  Source: asvetliakov/vscode-neovim

What is happening?
Screenshot 2020-09-25 083813

my init.vim

let mapleader = " "

if exists('g:vscode')
    nnoremap <Leader>f <Cmd>call VSCodeNotify('editor.action.formatDocument')<CR>
    nnoremap <Leader>e <Cmd>call VSCodeNotify('workbench.action.toggleSidebarVisibility')<CR>
else
endif

call plug#begin('~/.vim/plugged')

    Plug 'tpope/vim-surround'
    Plug 'tpope/vim-repeat'

    Plug 'asvetliakov/vim-easymotion'

call plug#end()

silent! call repeat#set("\<Plug>surround", v:count)

let g:EasyMotion_do_mapping = 0 " Disable default mappings

nmap <Leader>s <Plug>(easymotion-s2)
nmap <Leader>t <Plug>(easymotion-t2)

" Turn on case-insensitive feature
let g:EasyMotion_smartcase = 1

" JK motions: Line motions
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
map <Leader>h <Plug>(easymotion-linebackward)
map <Leader>l <Plug>(easymotion-lineforward)
map <Leader>w <Plug>(easymotion-w)
" map <Leader>e <Plug>(easymotion-iskeyword-e)
map <Leader>b <Plug>(easymotion-iskeyword-b)

" Gif config
map  / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)

map  n <Plug>(easymotion-next)
map  N <Plug>(easymotion-prev)

" clipboard
noremap <Leader>y "*y
noremap <Leader>p "*p
noremap <Leader>Y "+y
noremap <Leader>P "+p

xnoremap <Leader>y "*y
xnoremap <Leader>p "*p
xnoremap <Leader>Y "+y
xnoremap <Leader>P "+p

map <Leader>n :nohl<CR>

" vim surround
autocmd FileType php let b:surround_45 = "<?php \r ?>"
bug

Most helpful comment

you can add this to your keybindings.json in meantime:

            {
                "command": "vscode-neovim.paste-register",
                "key": "ctrl+r /",
                "when": "editorTextFocus && neovim.mode == insert && !neovim.recording && neovim.ctrlKeysInsert",
                "args": "/"
            }

All 6 comments

That's not very informative issue description. What did you press, what happened, what should happen instead. Your init.vim content

Sorry, i see now. There is no keybinding for pasting from register / in insert mode. And your screen is :registers message

you can add this to your keybindings.json in meantime:

            {
                "command": "vscode-neovim.paste-register",
                "key": "ctrl+r /",
                "when": "editorTextFocus && neovim.mode == insert && !neovim.recording && neovim.ctrlKeysInsert",
                "args": "/"
            }

you can add this to your keybindings.json in meantime:

            {
                "command": "vscode-neovim.paste-register",
                "key": "ctrl+r /",
                "when": "editorTextFocus && neovim.mode == insert && !neovim.recording && neovim.ctrlKeysInsert",
                "args": "/"
            }

Thanks bro !!!

Reopening to not forget to add missing keybinding by default

I'm having another issue which is to use the unnamed " register in a keyboard layout that have the " key as a dead key (i.e. US International).
That's a vscode problem actually and I could not find anyone having the same issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeljkofilipin picture zeljkofilipin  路  3Comments

DrakeXiang picture DrakeXiang  路  3Comments

Liquidmantis picture Liquidmantis  路  3Comments

DrakeXiang picture DrakeXiang  路  4Comments

hholst80 picture hholst80  路  3Comments