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]
本文介绍如何在Windows环境下配置Vim编辑器,使其能够通过右键菜单选项在新标签页中打开文件。步骤包括修改注册表项、设置命令路径及添加图标等。
1649

被折叠的 条评论
为什么被折叠?



