Re: Cut, Copy, Paste Nightmare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim wrote:
> Tim:
>>> Linux:  I have some document with a word I'd like to replace.  I
>>> *have* to delete the word, find and highlight its new replacement,
>>> paste it into the document.
> 
> Todd Zullinger:
>> For me, this would be done in vim with a search and replace.
>> 
>>     :%s/old/new/g
> 
> Sometimes you don't want to replace every instance, that's where
> copy and paste would (otherwise) be more useful.

Nah, that's where a range would be useful. ;-)

Just replace old with new between lines 35 and 40:

    :35,40 s/old/new/g

Or you can just replace the current line by leaving off the % (for all
lines) or the 35,40.  Then hit n to get to the next occurrence of old,
and if it's one you want to skip, hit n again.  It's pretty fast for
me to do this sort of thing.  And as I said, you can use regex's in
there as well, which is something I simply couldn't give up.

You can even select a block of text and then apply the replacements to
just that block.  I learned a good many tricks like this by using gvim
and watching what commands it ran when I used the graphical search and
replace.  That was enough to make me think learning more about it was
worth my time.  And for me, it's proved invaluable.

But I also do my best to not use formats like .doc or .odt.  For
those, a nice search and replace in the interface is very nice.  Does
copy/paste not work properly using ctrl-c/ctrl-v on linux just as it
would on windows?

It seems (from what others have said in this thread) like it is
supposed to work better than it often does in practice, but that it's
a bug in the applications when it doesn't, rather than a flaw in the
way X works.  I don't test this all that often so I can't speak to
what apps work well and which don't in this respect.

I'm not trying to argue that the way I do things is the only right way
to do them.  Hopefully it doesn't come out that way.  ;-)

- -- 
Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
The people cannot delegate to government the power to do anything
which would be unlawful for them to do themselves.
    -- John Locke

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iG0EARECAC0FAkR+mCEmGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt
ei5hc2MACgkQuv+09NZUB1oenQCfesIO8ZbGFKxjP2QvtLVqbyOpbO4AnRGXo45e
7fb1h6M3S+BxPXm7oPC6
=AdYv
-----END PGP SIGNATURE-----

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux