作者ggirls (哥)
看板Editor
标题[vim ] (windows)如何打开 where 到路径的档案
时间Sun Nov 19 07:27:43 2017
我想快速打开我常写的档,这些档所在目录在 path 变数上,where 也都找得到。
有没有办法快速在cmd中
vim filename
这样来打开档?
又或类似 vim < where filename
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.136.10.51
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Editor/M.1511047665.A.7AB.html
※ 编辑: ggirls (114.136.10.51), 11/19/2017 07:30:50
※ 编辑: ggirls (114.136.10.51), 11/19/2017 08:07:24
1F:→ fjm31714: xargs 11/21 00:44
2F:推 akria: 除了 xargs ,应该还要配合 sed 处理 \ 11/21 02:11
3F:→ akria: ex. > where file | sed "s/\\/\\\\/g" | xargs gvim 11/21 02:11
4F:推 mars90226: xargs会让vim坏掉,千万不要用 11/21 12:00
5F:→ mars90226: 真的要的话要用xargs开sh去开vim 11/21 12:00
6F:→ mars90226: 你可以用 vim $(where filename) 之类的方式 11/21 12:01
8F:→ fjm31714: xargs 的 main page 有 emacs 的范例 vim 适用 11/21 22:45
9F:→ puller: 试试:bro old<tab> 01/27 03:02
10F:→ Bellkna: 装ctrlp? 10/05 03:24