shougo / neoyank.vim Goto Github PK
View Code? Open in Web Editor NEWSaves yank history includes unite.vim/denite.nvim history/yank source.
License: Other
Saves yank history includes unite.vim/denite.nvim history/yank source.
License: Other
Hello,
I am getting this error message when starting neovim 0.1.6
.
Error detected while processing function neoyank#_append[1]..neoyank#_load:
line 24:
E712: Argument of get() must be a List or Dictionary
On TextYankPost
this plugin does getreg(name), getregtype(name)
with a loop of different registers. This is very ineffficient and causes clipboard provider usage even if the register was not a clipboard (or even for an unnamed clipboard in a g/xx/d
loop where nvim would've normally only copied on the last delete). Instead it should use v:event.regname
to get the name of the register yanked to and the contents and type in v:event.regcontents
and v:event.regtype
Hi,
I would like to understand the exact nature of this source (or probably this is more a unite thing).
Thanks!
I'm having issues with appending, using this command:
nnoremap [unite]p :Unite -no-split -default-action=append -start-insert history/yank<Return>
No matter where the cursor is in the line the text is pasted after the first character.
When using p
, vim will paste the text right after the cursors, when chosing a line from yankring and pressing p
and I press Enter
it will paste the text in front of the cursor (like pressing P
in normal mode). Is it possible to configure this setting?
I have a buffer like this ( "|" is cursor ):
fo|o
bar
buzz
I yanked entire line 1 by "yy" command and move cursor to "a" in line2:
foo
b|ar
buzz
A. When I type "p" buffer will changed like this:
foo
bar
|foo
buzz
"p" insert the yanked text to next line.
B. When I run "Unite history/yank" and select first item.
foo
|foo
bar
buzz
"Unite history/yank" insert the yanked text to previous line.
C. when i run "Denite neoyank" and select first item.
foo
b|foo
ar
buzz
"Denite neoyank" insert the yanked text to the cursor position.
I expect that B and C is consist with A.
(I use head version of neoyank.vim and vim8.1.1401)
I have the following mapping that mimicks the autoselect behaviour in neovim:
vmap <Esc> "*ygv<C-c>
If I visually select some lines and press escape I get the following error:
Error detected while processing function neoyank#_yankpost[5]..<SNR>163_add_register:
line 13:
E691: Can only compare List with List
Hi, @Shougo.
I really loved this plugin, but I noticied that it has a deprecated dependency. Is possible to use denite.nvim or I must stick with unite.vim?
Thanks!
When I yank a line then yank the next line, then use :Denite neoyank -default-action=yank
I would expect to have line content
in my register.
But actually I have +: line content\n
Is there a simple fix, that I have overseen?
Hi Shougo,
Sometimes my neoyank.vim doesn't save/display the yanked text immediately across Vim instances, especially if I yanked something in a Vim instance, then quickly move to another Vim instance or quickly closed the yanked Vim instance, then the text doesn't appear immediately in Unite buffer.
I notice that the yank_history uses json. I wonder why is this the choice, given that json parsing can sometimes be very slow for large yank_history?
For bash_history for example bash just uses plain text file for its history and the result is almost immediate. The same goes for YankRing for example.
I wonder if neoyank.vim should just move to plain text files & use async to save the registers in the background?
(P/S: I'm mainly using YankRing.vim to substitute for not having either +clipboard or +xterm_clipboard in my remote server. Thus, YankRing.vim acts like a clipboard register for me. I have been trying to integrate neoyank.vim to replace YankRing.vim in this regard but haven't been able to do that. I love Unite.vim & would like to use it for everything.)
:global
command is very slow when neoyank.vim is enabled.
clipboard=[unnamed|unnamedplus]
, not clipboard=
.:global
command works normally.
set rtp+=~/vim-plug/denite.nvim
set rtp+=~/vim-plug/neoyank.vim
let g:python3_host_prog = expand('~/program/python/python37/python.exe')
set encoding=utf-8
set clipboard+=unnamedplus
:normal oa^M
50.
シュゴさん、
ニオヴィムのplugin開発ご苦労様です。おかげさまで、今では僕が日々 software development に使っているプログラムの中では、ニオヴィムが一番使われます。
これはかなり前からある質問なのですがsshを使っている時、sshクライエントとsshホストのクリップボードが違うため、ニオヴィムの中でyー
を使用した場合、どこにもコピーされません。
具体的にホストがKali Linux, xfceの場合、使われるクリップボードソフトは xclip であり、クライエントがMacの場合そちらのソフトはpbcopy/pbpaste になります。どのようにしたら、Kali Linux の ssh セッションからMacのpbcopy にテキストを移すことができるのでしょうか?
僕の考えでは、scpなどのfile transfer protocolを使ってテキストを一時的にフィイルとして送り、クライエント側で cat temp | pbcopy
などのcommandを使ってpbcopyにテキストを送る手法が思いついたのですが、実際、これをvimscriptでかく知識がないため、とりあえずシュゴさんの意見を伺いにきました。
今年僕は大学で、sys admin の仕事があるため、大抵自分のMac 環境(environment)ではなく、sshを等して学校のサーバー環境で働くため、yank via sshが実現できたら効率アップに繋がります。よろしくお願いします。
Although I speak Japanese fluently, I took computer science in English, so if its easier to understand for you, we can communicate in English as well.
Would be awesome to have this to be upgraded to use denite.nvim instead of unite.vim.
I'm not used to write vim plugins, but I would be happy to help you there was some guidance on how to do this.
Hi @Shougo,
When I yank a sentence containing '\n' (i.e. press 'dd', 'yy'), yank history has the sentence and '\n' added at its tail like
*: on_source = ['denite.nvim']\n
*: on_source = ['denite.nvim']
I think that neoyank adds a last yanked sentence from clipboard when I open neoyank with denite.
If I don't use * register, this problem doesn't occur.
With the latest neovim (master) and the following minimal vimrc:
let $DOTVIM = expand('$HOME/.config/nvim')
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/denite.nvim
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/neoyank.vim
filetype plugin indent on
set clipboard=unnamedplus
when I start neovim I get:
Error detected while processing function neoyank#_append[4]..provider#clipboard#Call[6]..2:
line 8:
E691: Can only compare List with List
Error detected while processing function neoyank#_append[4]..provider#clipboard#Call[6]..2:
line 8:
E15: Invalid expression: match(&clipboard, '\v(unnamed|unnamedplus)') >= 0 && get(s:selections[a:reg].data, 0, []) ==# clipboard_data
Error detected while processing function neoyank#_append:
line 4:
clipboard: provider returned invalid data
Error detected while processing function neoyank#_append:
line 4:
E170: Missing :endfor
Hi Shougo,
I'm wondernig if you think that the autocmd with CursorHold might be unnecessary in a newer version of neovim.
neoyank.vim/plugin/neoyank.vim
Line 16 in 2ae3c29
I've been using neoyank for awhile, and I will sometimes notice that the CursorHold Autocmd is taking a noticeable (albeit small) amount of time. This almost exclusively happens on Windows, and I'm pretty sure it has something to do with checking the registers.
I've added:
silent autocmd! neoyank CursorHold
to my init.vim
and the plugin still works well.
If you don't think it's unneccessary, perhaps you could provide a built in way to choose to not have the cursor hold autocmd added?
Thanks,
TJ
@Shougo I just want to improve denite layer in spacevim, and I found this plugin provide two sources are different.
in unite source we can see the content from register 0-9, but in denite source we can only see reigister "
.
When 'wildoptions'=pum
, tabbing through completions and switching to other process (like tmux switch pane) and switching back, then tab again, neovim will select second candidate.
neovim version: NVIM v0.4.0-799-gb9ba1295b
OS: Ubuntu 18.04 LTS
tmux version: 2.8
call plug#begin('~/.vim/plugged')
Plug 'Shougo/unite.vim'
Plug 'Shougo/neoyank.vim'
call plug#end()
set wildoptions+=pum
nvim -u minimal.vimrc
:h <Tab><Tab><Tab>
tmux-switching-other-pane
tmux-switching-back
<Tab>
These steps should select 4th candidate, but actually select 2nd candidate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.