Comments (11)
It's great when copy and paste are properly hooked up, but in a world with ssh, tmux, and custom Vim builds that aren't always configured quite right, you sadly can't really count on that. Personally I :set mouse=nvi
, so I can access the built-in terminal mouse support by pressing :
when necessary. But that feels a bit too clever to impose on the world.
from vim-sensible.
This isn't some bug I'm talking about. Try running Vim via SSH without ForwardX11
and you won't be able to access the system clipboard. On Linux, this means dragging to copy to primary selection and middle click to paste won't work. On a Mac, this means you can't select text and press Cmd-C to copy.
from vim-sensible.
Ah I can confirm by:
ssh remote-machine
vi remote-file
:set mouse=a
- Select text with your mouse
- Then the local terminal emulator fails to present a "Copy" operation, either for Ctrl-C/Cmd-C or from a menu.
from vim-sensible.
I'm with you, but my guess is that some people might prefer having some or all of their mouse events (e.g. to select text and copy it) handled by the terminal itself. (I'm not one of those people)
from vim-sensible.
@tpope honestly, I haven't seen it broken anywhere since I turned it in my personal configs last year. Can you actually reproduce it working badly, or are you relying on memory? If it is still broken for people, I'd love to go fix it.
(Which might not address all possible misconfigured custom vim builds, but what would?)
from vim-sensible.
ah! I honestly don't do that ever. I'm mostly after being able to scroll and select text with the mouse.
Since vim-sensible doesn't :set clipboard=
to anything, I think users expect the clipboard to be internal without further effort on their part, and this has been clearly communicated: #145
from vim-sensible.
Vim doesn't have an "internal clipboard", it has registers, and I think the incorrect terminology may be clouding your understanding.
When you need to copy something out of a remote Vim and paste it into a different application, how do you do it?
from vim-sensible.
@josephholsten, I'm not sure you quite understand the ssh scenario. Let's say you open a terminal emulator on your local machine. You ssh into a remote machine and start vim on the remote machine. If you make a visual selection and then use "*y
, this will copy the selected text into the system clipboard of the remote machine where vim is running, NOT your local machine where your terminal emulator is running.
If you need to copy into the system clipboard of your local machine, a simple workaround is to select text via the mouse which is handled by your local terminal emulator by default. If you make the remote vim handle it (via mouse=a
), this workaround wouldn't work.
We can always set mouse=a
in our personal configs (I have this; I also like @tope's mouse=nvi
idea), but I don't think we can expect vim-sensible to do it for us since there are many users who have to ssh and do other things where they would prefer having mouse events handled by their terminal emulator.
from vim-sensible.
Thanks for that thorough explanation @Asheq!
from vim-sensible.
> Then the local terminal emulator fails to present a "Copy" operation, either for Ctrl-C/Cmd-C or from a menu.
Not even with Shift pressed?
from vim-sensible.
As well as breaking copy/paste, it also breaks my terminal's right click menu.
from vim-sensible.
Related Issues (20)
- sessionoptions+=localoptions HOT 8
- Revert accidental <C-W> HOT 2
- viewoptions-=options HOT 1
- Installation instructions incorrect HOT 2
- Proposal: let g:netrw_banner = 0 HOT 2
- :set secure and :set nomodeline HOT 1
- sidescrolloff setting causes sudden row offsets in vifm plugin in Neovim on Windows HOT 1
- Scrolloff in terminal HOT 4
- Insert mode <c-w> mapping breaks abbreviations HOT 1
- "set display+=lastline" do nothing if added after "set display=truncate" HOT 1
- SSL certificate HOT 2
- `:redir` causes shell prompt to move when exiting vim HOT 2
- Terminal positions cursor in the bottom left of the screen when exiting Vim HOT 3
- Conflict with gitsessions.vim, syntax highlighting isn't restored HOT 2
- .vimrc:3: parse error near `\n' HOT 1
- Usage of :redir causes ≈10x perf regression when loading vim-sensible HOT 2
- vim-sensible causes indentation when typing "#" in YAML files? HOT 4
- New to vim - Followed instructions but nothing HOT 1
- Line 62, laststatus = 2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-sensible.