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

No need to wrap tmux escape codes starting with 2.5 #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

von-forks
Copy link

Per #32

@ConradIrwin
Copy link
Owner

@von / @von-forks — you mentioned in the issue you were still seeing some wierdness depending on how you opened vim. Did you ever get to the bottom of it?

@von von mentioned this pull request Jun 14, 2017
@ryanpcmcquen
Copy link

@von is this ready to go?

@von
Copy link

von commented Jul 2, 2017

@ryanpcmcquen Per my last couple of comments in #32 this will break pasting from Normal and Visual mode and I don't know how to fix that while have it still work well for me in Insert. Personally, I don't do past from Normal or Visual mode and expect it to work, so this Pull works fine for me, but caveat emptor.

@ryanpcmcquen
Copy link

@von I always switch to Insert mode as well ... I thought everyone did that?

@von
Copy link

von commented Jul 2, 2017

Apparently @ssiegel doesn't. He committed fd01b5d, which as I understand things, makes paste work from Normal and Visual mode, but breaks things for me. This Pull reverts that commit.

@ssiegel
Copy link
Contributor

ssiegel commented Jul 2, 2017

My idea was to get some protection from accidentally pasting while normal mode is active, resulting in execution of random normal mode commands. If I ever really wanted to execute pasted text in normal mode, I could always use :normal. I think this protective use of bracketed paste is similar to how the shell utilizes bracketed paste, preventing immediate execution of the pasted text.

@ryanpcmcquen
Copy link

@ssiegel is there any way to have that protection and still keep paste working in Insert mode?

@ssiegel
Copy link
Contributor

ssiegel commented Jul 15, 2017

@ryanpcmcquen As I said in #32, I'm not able to check this right now with a current version of Vim, but I suspect some bad interaction with the implementation of bracketed paste which is included since Vim 8.0.0210. Do we still need this plugin at all?

@ryanpcmcquen
Copy link

@ssiegel so should this plugin just disable itself on Vim greater than version 8?

@ssiegel
Copy link
Contributor

ssiegel commented Jul 15, 2017

@ryanpcmcquen Maybe somebody using Vim 8.0.0210 or later can tell us. (You?)

I am on Neovim and I deactivated this plugin as soon as it got native bracketed paste support (which unfortunately seems to be less reliable than this plugin, but that is another issue).

@ryanpcmcquen
Copy link

@ssiegel I am running an older version of Vim on some systems (7.3) and 8.0.95 on other systems, which isn't new enough to test this functionality.

@ssiegel
Copy link
Contributor

ssiegel commented Jul 15, 2017

@ryanpcmcquen Aha, so do you experience any problems when pasting in normal and/or insert mode? I still fail to understand how fd01b5d is related to the tmux change this pull request is about, and how I (author of fd01b5d, Neovim user, no longer using this plugin) can help to advance things.

To shed some light on this it might help to know what issues there are when using combinations of:

  • Vim < 8.0.0210
  • Vim >= 8.0.0210

and

  • tmux < 2.5
  • tmux >= 2.5
  • no tmux at all.

Bugs reproducible without using tmux should be reported and handled outside of this pull request.

@ryanpcmcquen
Copy link

@prashcr's script is working perfectly for me:

#25 (comment)

In fact, I made a plugin out of it:

https://github.com/ryanpcmcquen/fix-vim-pasting

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

Successfully merging this pull request may close these issues.

5 participants