Chinaunix首页 | 论坛 | 博客
  • 博客访问: 119944
  • 博文数量: 24
  • 博客积分: 3030
  • 博客等级: 中校
  • 技术积分: 580
  • 用 户 组: 普通用户
  • 注册时间: 2007-01-11 10:58
文章分类

全部博文(24)

文章存档

2011年(2)

2010年(4)

2009年(10)

2008年(8)

我的朋友

分类: LINUX

2010-04-22 17:56:37

Since I always copy file path from windows to my config file. it is more convenient to have a function can convert them automatically.

 (defun qw-backslash-to-slash-at-current-line ()
   "turn  backslash to slash at the current line"
   (interactive)
   (let ((end (min (point-max) (+ 1 (line-end-position)))))
     (save-excursion
       (goto-char (line-beginning-position))
       (while (re-search-forward "\\\\" end t)
       (replace-match "/" nil nil)))))

阅读(426) | 评论(0) | 转发(0) |
0

上一篇:swap window split

下一篇:Q1

给主人留下些什么吧!~~