Vim-open file in existing window new tab on Windows

Source: Internet
Author: User

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 shoshould 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 previusly 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]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.