Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste not working in OSX #29

Open
norcalli opened this issue Mar 19, 2015 · 7 comments
Open

Paste not working in OSX #29

norcalli opened this issue Mar 19, 2015 · 7 comments

Comments

@norcalli
Copy link
Contributor

I'm not sure about other OS's, but paste isn't working in any capacity for me. I believe it's just a no-op because of the default menu.

Regardless of the default menu, is sent to neovim, but neovim doesn't handle <D-...> mappings it seems because doing nmap <D-v> hi and then map < shows that it's registering it as individual keystrokes and not one key combination.

I can add a handler to respond to cmd-v from the menu, but I'm not sure how paste is implemented in neovim, and I would like to do it the official way if there is a msgpack endpoint.

@coolwanglu
Copy link
Owner

neovim uses pbcopy and pbpaste
http://neovim.org/doc/user/nvim_clipboard.html

@gglanzani
Copy link

@coolwanglu @norcalli Will we then be able to have it easily? Is there still work to be done?

@norcalli
Copy link
Contributor Author

norcalli commented May 9, 2015

I implemented it on my branch, but I think mine is outdated now. I did it the way neovim did it which is to use and and set mappings for different modes  and pretend the input with those keystrokes to trigger in the right mode. That's why there was a bug for a bit about those characters showing up in paste a while back.

Thank you,Ashkan Kiani

On Sat, May 9, 2015 at 1:04 AM, Giovanni [email protected] wrote:

@coolwanglu @norcalli Will we then be able to have it easily? Is there still work to be done?

Reply to this email directly or view it on GitHub:
#29 (comment)

@coolwanglu
Copy link
Owner

Did you set :set paste?

@norcalli norcalli closed this as completed May 9, 2015
@norcalli norcalli reopened this May 9, 2015
@norcalli
Copy link
Contributor Author

norcalli commented May 9, 2015

Sorry I was going to sleep last night. On the paste trigger, I do @ui.emit "input", "<f37>#{text}<f36>" and previously I defined

    @command 'inoremap <f37> <f36>'
    @command 'nnoremap <f37> <f36>o'
    @command 'set pastetoggle=<f36>'

where @command is just a @session.request "vim_command", [cmd], (err, resp) =>.

This should make it so that the paste command triggered inserts the text in each mode. Obviously I chose the behaviour of it pasting on a new line and choosing to stay in insert mode.

@vito-c
Copy link

vito-c commented Aug 31, 2015

When I go to insert mode then run cmd v I get my pasted text wrapped in <F37> However when I run "+p I get the correct pasted text.

@justinmk
Copy link

This is a nvim bug, not neovim-e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants