Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > vim中把用正则表达式匹配的字符串写到一个新文件的方法
【标  题】:vim中把用正则表达式匹配的字符串写到一个新文件的方法
【关键字】:vim
【来  源】:http://www.cublog.cn/u/24274/showart.php?id=177303

vim中把用正则表达式匹配的字符串写到一个新文件的方法

Your Ad Here redirect selected parts to a new file
1:  :g/patten/y A   Append to the
                     contents of the register if its name is given
                     uppercase {A-Z}
     create a file in vim
     "ap
2:delete unwanted lines
     :g/^[^0-9]\+\n/d
3:   :redir >> tmp
     :g/^\d\+/p
     :redir END
  "send output of previous global command to a new window
     :nmap <F5>  :redir @a<CR>:g//<CR>:redir END<CR>:new<CR>:put! a<CR><CR>

Debian wu-ftpd 慢的解决方案:【上一篇】
RHCE认证考试组成:【下一篇】
【相关文章】
  • Vim7中的Tab功能
  • 大家来学vim
  • 程序员的编辑器 -- VIM
  • 关于vimrc的有关设置
  • vim 命令(全)
  • vim中字体设置
  • A new window manager, a new vim plugin , much better one,more pretty
  • VIM的配置
  • 读者来稿:VIM 也玩取词翻译(zz)
  • VIM指南【英文图解】
  • 【随机文章】
  • 用Delphi实现WINDOWS中本地连接的启用和禁用(转贴)
  • SQL基本语句练习(二)
  • 利用XML和XSL生成较为复杂的多表头表格
  • 客户机安全设备
  • 在Oracle中找出重复的纪录的方法
  • SLES9 VMware 图形安装的设置
  • PHP新手上路(一)
  • 路由器原理
  • 如何监控AIX的单个file/lv/pv的繁忙程度?
  • C++ Builder 初学问与答(十八)
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.