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) |