Coder Social home page Coder Social logo

neoyank.vim's People

Contributors

idbrii avatar justinhoward avatar mitsu-suzuki avatar shougo avatar tc-mint avatar tex avatar thalesmello avatar wikimatze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

neoyank.vim's Issues

Incorrect usage of TextYankPost causes superfluous clipboard activity

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

Updating yank history from multiple files simultaneously

Hi,
I would like to understand the exact nature of this source (or probably this is more a unite thing).

  1. Is the yank history loaded from the history_yank cache file once when vim is started or is it updated synchronously? Let's say I have two instances of vim open. If I yank some text from one of the these, should I expect the yanked text to appear in the second instance if I initiate :unite history/yank after yanking from the first instance? Currently I dont see that happening in my setup. So I wonder if that's expected behavior.
  2. Sometimes the yanks appear at the bottom of the results. Is that also expected?

Thanks!

Text appended after the first character, not at the cursor

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.

Configure the yankring paste position

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?

Inconsistent behavior between p and neoyank/action for line yank

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)

Error when yanking a visual selection

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

Deprecated dependency?

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!

Action yank acts weirdly

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?

Sometimes neoyank.vim doesn't save/display the yanked text immediately across Vim instances

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 for neovim

summary

:global command is very slow when neoyank.vim is enabled.

  • This issue happen only with neovim, not vim8.
  • This issue happen with option clipboard=[unnamed|unnamedplus], not clipboard=.

Expected

:global command works normally.

Environment

  • neoyank.vim 6a41fd6
  • OS: windows10 1803
  • neovim 0.4.3

Minimal init.vim

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

Reproduce steps

  1. nvim -u _minirc
  2. :normal oa^M
  3. 50.
  4. :g/^$/d

sshを等してからneovimを使う際、neoyankをクライエントサイドのクリップボードプログラムにコンテンツを送ることができますか?

シュゴさん、
ニオヴィムの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.

Upgrade to denite.nvim

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.

A sentence containing '\n' is yanked twice in setting clipboard+=unnamed

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.

Can only compare List with List

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

Unnecessary Cursor Hold Check?

Hi Shougo,

I'm wondernig if you think that the autocmd with CursorHold might be unnecessary in a newer version of neovim.

autocmd neoyank FocusGained,FocusLost,CursorHold *

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

denite source is not same as unite source

@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 ".

neoyank cause neovim wildmenu forget current selection after FocusGained when 'wildoptions'=pum

Problem

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.

Environment

neovim version: NVIM v0.4.0-799-gb9ba1295b
OS: Ubuntu 18.04 LTS
tmux version: 2.8

Minimal .vimrc

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

Plug 'Shougo/unite.vim'
Plug 'Shougo/neoyank.vim'

call plug#end()

set wildoptions+=pum

Reproducible Steps

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.