Bug 327500 - Copy and replace does not work properly
Summary: Copy and replace does not work properly
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-12 13:40 UTC by Vishesh Handa
Modified: 2013-11-14 09:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vishesh Handa 2013-11-12 13:40:44 UTC
Quite often one needs to copy a block of text, and then replace another block of text with that on the clipboard. In normal vim one does this as follows -

1. Select the text and yank it (Eg - yib)
2. Select some new text and hit paste (Eg - vibp)
3. The selected text will be replaced with the text that was yanked in (1)

This is exactly how vim behaves. In contrast vim-mode in kate does not replace the text in (3) instead it just inserts it.
Comment 1 Dominik Haumann 2013-11-12 13:46:28 UTC
Simon, forgive me CCing you to this report (and many others), but maybe there is an easy fix? :-)
Comment 2 Simon St James 2013-11-12 15:42:18 UTC
Git commit 7dcde0546f8844fb50335f86518320e128c7daf8 by Simon St James.
Committed on 12/11/2013 at 15:32.
Pushed by sstjames into branch 'master'.

Replace the current selection (if any) in Visual Mode when pasting.

M  +7    -0    part/vimode/katevinormalmode.cpp
M  +6    -0    tests/vimode_test.cpp

http://commits.kde.org/kate/7dcde0546f8844fb50335f86518320e128c7daf8
Comment 3 Dominik Haumann 2013-11-14 09:21:58 UTC
Git commit 92192f38017b108c288a5146d1a5f4ad5a5c3ddc by Dominik Haumann, on behalf of Simon St James.
Committed on 12/11/2013 at 15:32.
Pushed by dhaumann into branch 'KDE/4.12'.

Replace the current selection (if any) in Visual Mode when pasting.

M  +7    -0    part/vimode/katevinormalmode.cpp
M  +6    -0    tests/vimode_test.cpp

http://commits.kde.org/kate/92192f38017b108c288a5146d1a5f4ad5a5c3ddc
Comment 4 Dominik Haumann 2013-11-14 09:33:20 UTC
Git commit cc69820001ca2da68496efbb65fffe3f655f15d8 by Dominik Haumann, on behalf of Simon St James.
Committed on 12/11/2013 at 15:32.
Pushed by dhaumann into branch 'KDE/4.11'.

Replace the current selection (if any) in Visual Mode when pasting.

M  +7    -0    part/vimode/katevinormalmode.cpp

http://commits.kde.org/kate/cc69820001ca2da68496efbb65fffe3f655f15d8