Closed kubaracek closed 4 years ago
I can't reproduce this. It works as expected here.
Just tried to comment out all my layers and it works. So there must gotta be a one that causes this. Let me debug it
Ok debugged it by commenting out my active layers and this is caused by osx
layer.
I can confirm this and was surprised with this behaviour and wondered this must be the Vim way and continued using it! :smiling_imp:
I faced this in hybrid style(hybrid state). I think delete-selection-mode
would be useful in hybrid-state
.
Have been having this issue for ages. Did you find any good way to configure the osx layer to fix the issue?
Actually, just tried disabling the osx
layer. Issue is still present for me
Steps I used to reproduce:
p
emacs-lisp
git
;; osx
markdown
org
ruby-on-rails
elixir
restclient
Hi @aspett do you have any layer that uses your system clipboard in emacs? When I copy anything from web/(any other app) then p
uses another (emacs) clipboard. Which is what I would except.
I have this simple config defined in dotspacemacs/user-config
(defun pbcopy ()
(interactive)
(call-process-region (point) (mark) "pbcopy")
(setq deactivate-mark t))
(defun pbpaste ()
(interactive)
(call-process-region (point) (if mark-active (mark) (point)) "pbpaste" t t))
(defun pbcut ()
(interactive)
(pbcopy)
(delete-region (region-beginning) (region-end)))
(global-set-key (kbd "C-c c") 'pbcopy)
(global-set-key (kbd "C-c v") 'pbpaste)
(global-set-key (kbd "C-c x") 'pbcut)
This allows me to copy, paste and cut from/to my system clipboard using C-c c
for copy C-c v
for paste and C-c x
for cut
Heya @JacobJakub. No, I've tried disabling all layers and reverting to a stock config, but no joy. I was expecting that copying to system clipboard would allow me to paste via p
. I'd rather not set up special keybinds for pbcopy etc- having system clipboard copy into another register would be an ideal alternative.
Same issue here
While this is not yet solved, one can use kill-ring (SPC r y) to avoid looking for and copying source of attempted paste second time
I am having the same issue with the osx
layer
I was having the same issue with spacemacs and my own configuration on Arch Linux. Found this solution here. It worked for me, hope it helps.
this is a duplicate of https://github.com/syl20bnr/spacemacs/issues/3735
@felipeagc Thank you so much bro :)
I'm having a similar problem that sounds like the same root cause.
If I y
something in visual mode, or yank a line while not in visual mode, move elsewhere, delete a word or line (d w
or D
), then p
, the thing that gets pasted is the thing I just deleted, not thing thing I yanked.
System:
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!
I'm having a similar problem that sounds like the same root cause.
If I
y
something in visual mode, or yank a line while not in visual mode, move elsewhere, delete a word or line (d w
orD
), thenp
, the thing that gets pasted is the thing I just deleted, not thing thing I yanked.System:
- OS: macOS 10.14.2 (18C54)
- SpaceMacs version: 0.200.13@26.1
- Emacs version: d12frosted/emacs-plus/emacs-plus: stable 26.1 (bottled), devel 26.1-rc1, HEAD
@bobdanek This is a default vim behavior :)) https://vim.fandom.com/wiki/Remembering_previous_deletes/yanks
type :reg to see all the registers
Description
When I
y
ank a word and then in visual mode select a text that I want to replace pressingp
seems to delete the highlighted text which yanks it and paste it instead of the originally yanked text making it impossible to replace a text.Update
Seems like
osx
layer causes this weird behaviour.Reproduction guide
Highlight a word in visual mode. press
y
to yank the selection go to a word that you want to replace go to visual mode and select this word pressp
Right now the word should be replaced with the yanked text but it's replaced with itself == makes no change to the word.
System Info