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 in Visual mode as in Vim #3735

Open
ReneFroger opened this issue Nov 9, 2015 · 6 comments
Open

Paste in Visual mode as in Vim #3735

ReneFroger opened this issue Nov 9, 2015 · 6 comments
Labels
Enhancement ☺ stale marked as a stale issue/pr (usually by a bot)

Comments

@ReneFroger
Copy link

This is by default by Evil. Paste some text from another application. Then I paste it into Emacs inside normal mode with p. Then switch back to the another application, select another text, copy it. Switch back to Emacs, visually select the text, and press paste. But the text inside the region will not be replaced with the text from the clipboard.

This is not with the default Vim.

See the answer below, it helped a lot of people.

http://emacs.stackexchange.com/questions/14940/emacs-doesnt-paste-in-evils-visual-mode-with-every-os-clipboard/15054#15054

If Spacemacs would be like Vim, then this option should be set.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
@ReneFroger
Copy link
Author

Why is this stale? It's still relevant for me.

@duianto duianto removed the stale marked as a stale issue/pr (usually by a bot) label Mar 15, 2020
@duianto
Copy link
Collaborator

duianto commented Mar 15, 2020

A stale bot was added that labels any issue that hasn't had any activity for a year as stale.


I remember having to use that suggested expression (from https://emacs.stackexchange.com/questions/14940/evil-mode-visual-selection-copies-text-to-clipboard-automatically/15054#15054):

(fset 'evil-visual-update-x-selection 'ignore)

years ago when I started using Spacemacs, because any visual selection change (even just moving the cursor by one character) copied the selected text to the Windows clipboard.

I don't know when that behavior was changed, but I haven't needed that expression or seen that issue for years.

So it's likely that the issue was present when this issue was posted: Nov 9, 2015

Your reproduction steps seem to be working as expected for me now,
on both the master and develop branches of Spacemacs,
and without Spacemacs, with just Emacs and the Evil package installed:

  • Copy text from this issues reproduction steps:
text from another application
  • Switch to Emacs and open the scratch buffer: C-x b scratch RET (SPC b s in Spacemacs)
  • Paste: p
  • Switch back to this issue and copy the text:
select another text
  • Switch back to Emacs and select the previously pasted text: V (uppercase v)
  • Paste: p

Observed

The selected text was replaced as expected.

Windows 1903
#### System Info :computer:
- OS: windows-nt
- Emacs: 26.3
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. 1d797ffa4)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: ivy
- Layers:
```elisp
(autohotkey
 (auto-completion :variables auto-completion-use-company-box t)
 command-log emacs-lisp git ivy imenu-list javascript
 (markdown :variables markdown-live-preview-engine 'vmd markdown-command "vmd")
 multiple-cursors org pdf python
 (shell :variables shell-default-shell 'shell shell-default-height 30 shell-default-position 'bottom)
 spell-checking syntax-checking treemacs version-control)
```
- System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Mar 15, 2021
@mcardozo
Copy link

Any solution?

@github-actions github-actions bot removed the stale marked as a stale issue/pr (usually by a bot) label Mar 14, 2022
Copy link

github-actions bot commented May 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ☺ stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

4 participants