This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 再说一个面世时曾经被问的问题有一段文本,例如
I'm a student
I lived in Canada,
I don't like this stupid country,
but I'd like to live here.
用一个vi命令,把它变成
I'm a student
I lived in Canada,
I don't like this stupid country,
but I'd like to live here.
-guest:guest;
2001-4-10
{258}
(#43252@0)
-
空格没了有一段文本,例如
I'm a student
I lived in Canada,
I don't like this stupid country,
but I'd like to live here.
用一个vi命令,把它变成
__I'm a student
__I lived in Canada,
__I don't like this stupid country,
but I'd like to live here.
__代表空格
-guest:guest;
2001-4-10
{276}
(#43256@0)
-
1,$s/^/^_/ ( _代表空格)
-pasu(InTheSky);
2001-4-10
(#43262@0)
-
第2个^多于了吧?当时我是没回答上,不过工作还是找到了。
-guest:guest;
2001-4-10
{38}
(#43267@0)
-
面试嘛,安全起见,呵呵,我也记不清了,因为好久没有用了。看来我们是同行,注册个ID吧,咱们多交流交流。
-pasu(InTheSky);
2001-4-10
(#43340@0)
-
:1,$ s/ //g
-flying_snow(飞雪浮冰);
2001-4-10
(#43266@0)
-
:1,$s/^I/_I/g
-hotpot(麻辣烫);
2001-4-10
(#43276@0)
-
you're right. 忘了看but那句不用改了。
-pasu(InTheSky);
2001-4-10
(#43343@0)
-
I should be : 1, $ s/^I/ I/
-lumlumq(lumlum);
2001-4-11
(#44005@0)
-
什么命令也不用,呵呵,这不是一样的嘛!
-pasu(InTheSky);
2001-4-10
(#43257@0)
-
Sorry. a simple question: where should I input these characters "$s/^/^_/ "? In EDIT mode or some other modes? tks.
-howru(How are you?);
2001-4-11
(#43993@0)
-
Press Esc, and then press Enter. "1,$" means apply the following command from the first line to the last line. Don't break it into two parts.
-pasu(InTheSky);
2001-4-11
(#43997@0)