Vim – Open file in existing window new tab on Windows

Opening files in Vim editor via context menu is quite simple, but what if I want to open a file in a new tab in existing window?
The solution is quite simple, at least on my Windows 7 machine, but I guess it should work also on previous versions of  Windows.
1. Open regedit
2. find HKEY_CLASSES_ROOT/*/shell
3. right click on “shell” folder and create a new Key and call it, i.e. “Open in a new Vim tab”
4. right click on currently created folder and create a new Key called “command”
5. into default string value enter following code:
C:\apps\Vim\vim73\gvim.exe --remote-tab-silent %1
ofcource the path to your gvim executable must be valid.

[custom_frame_center shadow="on"]

[/custom_frame_center]

6. check it

[custom_frame_center shadow="on"]

[/custom_frame_center]


Add icon to your created contextual menu

if you want to add an icon to your contextual shortcut, follow these few steps
1. find your previously created item in regedit

2. right click on the item and select “Expandable string value”

[custom_frame_center shadow="on"]

[/custom_frame_center]

3. change the “Name” of the new value to “Icon”

4. make modification and add path to your icon file

[custom_frame_center shadow="on"]

[/custom_frame_center]

5. check your update

[custom_frame_center shadow="on"]

[/custom_frame_center]


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值