gVim 打开和保存文件时,弹出 cmd,求解决 - V2EX
Nixus
V2EX    Vim

gVim 打开和保存文件时,弹出 cmd,求解决

  •  
  •   Nixus Apr 1, 2015 3965 views
    This topic created in 4065 days ago, the information mentioned may be changed or developed.

    这个gVim极其配置,是从事开发工作多年来收集整理,自己通过bat,编译成exe文件,主要为了解决在当前窗口的新标签打开新文件;

    目的达到了,但是有后遗症:每次打开和保存文件的时候,总会弹出黑色的cmd命令行窗口。求高手解决!

    注:这个bat中,设置的文件根路径为C盘,所以,必须把压缩包解压到C:\下,才能够在打开新文件时,在gVim的当前窗口新建标签打开。

    下载地址:
    http://share.weiyun.com/9975c7d95f5471dd72f7b7f657e484b7

    被编译为exe的bat文件内容:
    [code]
    @echo off
    start /B C:\Vim\vim74\gvim.exe -p --remote-tab-silent "%~f1"
    exit
    [/code]

    13 replies    2015-04-01 11:44:39 +08:00
    laoyang945
        1
    laoyang945  
       Apr 1, 2015 via Android
    我是把这个命令放到右键菜单里
    Nixus
        2
    Nixus  
    OP
       Apr 1, 2015
    @laoyang945 这样可以?我是在打开文件和保存文件的时候会有cmd弹窗的

    另:
    bat代码:
    ```
    @echo off
    start /B C:\Vim\vim74\gvim.exe -p --remote-tab-silent "%~f1"
    exit
    ```

    没有[code][/code]
    Nixus
        3
    Nixus  
    OP
       Apr 1, 2015
    咦……回复不支持markdown?
    laoyang945
        4
    laoyang945  
       Apr 1, 2015 via Android
    @Nixus 当然,你直接改注册表里面那个用vim打开的对应命令就好了
    zhouzm
        5
    zhouzm  
       Apr 1, 2015
    试试这个办法:
    Using the Windows Send To menu: http://vim.wikia.com/wiki/Launch_files_in_new_tabs_under_Windows
    bigtan
        6
    bigtan  
       Apr 1, 2015
    https://github.com/bigtan/launcher

    这个小项目可以不打开console执行cmd,不出现那个黑乎乎的框。
    Nixus
        7
    Nixus  
    OP
       Apr 1, 2015
    @bigtan 谢谢。Usage中,看不明白,可以指点一下吗?
    bigtan
        8
    bigtan  
       Apr 1, 2015   1
    @Nixus launcher.exe 后面的命令都会被传递到cmd上,但是不会出现console窗口。
    Nixus
        9
    Nixus  
    OP
       Apr 1, 2015
    @bigtan 是否需要自行编译launcher.exe?下载到的launcher文件中没有exe文件
    bigtan
        10
    bigtan  
       Apr 1, 2015
    @Nixus release有编译好的。
    Nixus
        11
    Nixus  
    OP
       Apr 1, 2015
    @bigtan 没找到呀,哥,release在哪儿呀?
    bigtan
        12
    bigtan  
       Apr 1, 2015   1
    Nixus
        13
    Nixus  
    OP
       Apr 1, 2015
    @bigtan 试过了,双击launcher可以打开gVim,但是双击文件没有任何反应(文件默认打开方式已经指向了launcher的快捷方式了)
    放弃……
    About     Help     Advertise     Blog     API     FAQ     Solana     3999 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 40ms UTC 06:23 PVG 14:23 LAX 23:23 JFK 02:23
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86