How to "paste-over" a line with Vi(m)?
1
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.
2
Name:
Anonymous
2008-02-28 16:04
In EMACS, we have kill rings.
3
Name:
Anonymous
2008-02-28 16:06
>>2
That doesn't exactly help. Please don't turn this into an editor war.
4
Name:
Anonymous
2008-02-28 16:08
"-dd
5
Name:
Anonymous
2008-02-28 16:09
>>3
You must be new here.
6
Name:
Anonymous
2008-02-28 16:11
7
Name:
Anonymous
2008-02-28 16:20
>>6
Thanks! I'll have to use registers more often.
8
Name:
Anonymous
2008-02-28 16:21
9
Name:
Anonymous
2008-02-28 16:23
You're editing wrong. Try sed -i s/2007/2007-2008/ *.code on for size.
10
Name:
Anonymous
2008-02-28 16:24
11
Name:
Anonymous
2008-02-28 16:30
>>10
You must be new here.
12
Name:
Anonymous
2008-02-28 16:31
use perl
13
Name:
Anonymous
2008-02-28 18:44
14
Name:
Anonymous
2008-02-28 21:09
>>13
Yes. I wasn't about to look up Vim's syntax for it though.
15
Name:
Anonymous
2008-02-28 22:32
>>14
You must be new here.
16
Name:
Anonymous
2008-02-29 1:08
>>15
You must be gnew here.
17
Name:
Anonymous
2008-02-29 1:09
>>16
You must be GNU here.
18
Name:
Anonymous
2008-02-29 1:12
>>17
What does the ``G'' in ``GNU'' stand for?
19
Name:
Anonymous
2008-02-29 1:21
>>18
You must be GNU's Not Unix here.
20
Name:
Anonymous
2008-02-29 9:05
wuts vi??
21
Name:
Anonymous
2008-02-29 9:09
22
Name:
Anonymous
2008-02-29 9:43
23
Name:
Anonymous
2008-02-29 11:17
how do i exited vi???
24
Name:
Anonymous
2008-02-29 11:24
killall -9 vi
25
Name:
Anonymous
2008-02-29 11:56
I laughed when I pressed C-x C-c in vi.
26
Name:
Anonymous
2008-02-29 12:10
>>25
Heathen! <Escape>:q<Enter> FTW!
27
Name:
Anonymous
2008-02-29 12:11
>>26
Heathen!
ZZ is superior.
28
Name:
Anonymous
2008-02-29 14:48
:qa!
29
Name:
Anonymous
2008-02-29 15:07
:x
30
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:
31
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.
32
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.
33
Name:
Anonymous
2010-12-10 11:21
34
Name:
Anonymous
2011-02-04 16:37