一月 12, 2011

消除vim中的換行符號

Posted in Uncategorized 於 3:56 下午 由 midashuang

之前遇過相同的文件在不同系統中開啟後,竟然在結尾又出現了一堆^M。

可以透過用一行指令去掉這些令人討厭的換行符號。解答如下:
:%s/^M//g
(記得^M要用
CTRL-V CTRL-M來輸入)
或者是
:%s/\r//g

廣告

7 則迴響 »

  1. Howdy! I just want to give a huge thumbs up for the nice info you’ve
    gotten here on this post. I will likely be coming
    again to your blog for extra soon.

  2. Petra said,

    Wonderful blog! Do you have any helpful hints for aspiring writers?
    I’m planning to start my own site soon but I’m a little lost on everything.
    Would you advise starting with a free platform like WordPress or go for a paid option?
    There are so many choices out there that I’m totally overwhelmed .. Any suggestions? Thank you!

  3. I am new to developing internet sites and I was wondering if having your
    blog title relevant to your articles and other content really that vital?
    I see your title, “消除vim中的換行符號 | Midashuang’s Blog " does
    seem to be spot on with what your website is about but yet, I
    prefer to keep my title less content descriptive and based
    more around site branding. Would you think this is a good idea
    or bad idea? Any kind of assistance would be greatly appreciated.

  4. 23hq.com said,

    My developer is trying to persuade me to move to .

    net from PHP. I have always disliked the idea
    because of the costs. But he’s tryiong none the less. I’ve been using Movable-type on a variety of websites for about a year and am
    anxious about switching to another platform. I have heard good things about blogengine.
    net. Is there a way I can import all my wordpress posts into it?
    Any help would be really appreciated!

  5. web page said,

    Excellent web site. Plenty of helpful info here.
    I’m sending it to a few buddies ans also sharing in delicious. And naturally, thank you on your effort!

  6. These are really fantastic ideas in on the topic of blogging.
    You have touched some nice things here. Any way keep up wrinting.

  7. Catherine said,

    I am actually glad to read this weblog posts
    which includes lots of helpful information, thanks
    for providing these data.


發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: