Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

How to "paste-over" a line with Vi(m)?

Name: Anonymous 2008-02-28 15:40

I want to change the copyright line of the source files of a project to have a copyright of "2007-2008" instead of just "2007". I know that I can yank one changed line ("yy") and paste it ("p"), but I'm wondering if there's a way to delete a line without yanking it (which is what "dd" does automatically) so I can quickly replace the old lines with the new one.

Name: Anonymous 2008-02-28 16:04

In EMACS, we have kill rings.

Name: Anonymous 2008-02-28 16:06

>>2
That doesn't exactly help. Please don't turn this into an editor war.

Name: Anonymous 2008-02-28 16:08

"-dd

Name: Anonymous 2008-02-28 16:09

>>3
You must be new here.

Name: Anonymous 2008-02-28 16:11

>>4
Disregard that.

"_dd

Name: Anonymous 2008-02-28 16:20

>>6
Thanks! I'll have to use registers more often.

Name: Anonymous 2008-02-28 16:21

>>4,6
DON'T HELP HIM!!

Name: Anonymous 2008-02-28 16:23

You're editing wrong. Try sed -i s/2007/2007-2008/ *.code on for size.

Name: Anonymous 2008-02-28 16:24

>>8
Why not?

Name: Anonymous 2008-02-28 16:30

>>10
You must be new here.

Name: Anonymous 2008-02-28 16:31

use perl

Name: Anonymous 2008-02-28 18:44

>>9
:%s/2007/&-2008

Name: Anonymous 2008-02-28 21:09

>>13
Yes. I wasn't about to look up Vim's syntax for it though.

Name: Anonymous 2008-02-28 22:32

>>14
You must be new here.

Name: Anonymous 2008-02-29 1:08

>>15
You must be gnew here.

Name: Anonymous 2008-02-29 1:09

>>16
You must be GNU here.

Name: Anonymous 2008-02-29 1:12

>>17
What does the ``G'' in ``GNU'' stand for?

Name: Anonymous 2008-02-29 1:21

>>18
You must be GNU's Not Unix here.

Name: Anonymous 2008-02-29 9:05

wuts vi??

Name: Anonymous 2008-02-29 9:09

>>20
I must be old here.

Name: Anonymous 2008-02-29 9:43

>>20
wuts 6??

Name: Anonymous 2008-02-29 11:17

how do i exited vi???

Name: Anonymous 2008-02-29 11:24

killall -9 vi

Name: Anonymous 2008-02-29 11:56

I laughed when I pressed C-x C-c in vi.

Name: Anonymous 2008-02-29 12:10

>>25
Heathen! <Escape>:q<Enter> FTW!

Name: Anonymous 2008-02-29 12:11

>>26
Heathen! ZZ is superior.

Name: Anonymous 2008-02-29 14:48

:qa!

Name: Anonymous 2008-02-29 15:07

:x

Name: Anonymous 2008-02-29 18:55

>>25
I LAUGHED TOO but then i found out it does that even if you only hit C-c :sniff:

Name: Anonymous 2009-03-06 6:05


Emacs EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   emacs emacs emacs   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   EMACS EMACS EMACS   emacs emacs emacs   EMACS EMACS EMACS   EMACS EMACS EMACS   emacs emacs emacs   EMACS EMACS EMACS   EMACS EMACS EMACS   emacs emacs emacs   EMACS EMACS EMACS   EMACS EMACS EMACS.

Name: Anonymous 2009-07-12 3:16


Lisp CLOS Python Ruby But if you   want to mention   shorter to do   the bare minimum   to become a   programmer I said   in OP as   a long time   ago before java   before C before   fortran before computers   before people before   and know just   how rage inducing   they are Anyways.

Name: Anonymous 2010-12-10 11:21

Name: Anonymous 2011-02-04 16:37

Don't change these.
Name: Email:
Entire Thread Thread List