Open file or direcotry using marked text file/directory path.
(defun open-mark-file-path ()
"open file or directory by marking text file path"
(interactive)
(let ((fpath (buffer-substring-no-properties (region-beginning) (region-end))))
(progn
(find-file fpath)
)
)
)
(global-set-key [f5] 'open-mark-file-path)
todo: If nothing is marked, it will auto-use the string at current cursor point as path.
阅读(432) | 评论(0) | 转发(0) |