Well, what I'm talking about here is not how to use tabnew in the terminal to open a new tag, but how to use gvim to open a new file in windows, it is opened on the gvim tab by default.
Here there are two main methods, in fact, the principle is the same (that is, gvim executes the command parameters are the same), but there are some differences in the implementation of windows.
1. Use Windows to send messages.
Editors such as emeditor will add their shortcuts to the editor by default after installation. Vim directly uses Vim to edit the shortcut menu, in order not to conflict with the default shortcut, we use this method to enable the new file opening function on the tab.
1) Start-> Run, enter sendto
2) In the pop-up window, right-click and select new shortcut.
3rd, fill in the "Project location" (that is, the path of gvim.exe and the execution parameters) in "done", and enter
"C: \ Vim \ vim72 \ gvim.exe"-p -- remote-tab-silent "% *"
Note: quotation marks must be placed on the path. For example, the default installation path is in c: \ Program.
Files, you need to add quotation marks on the path, that is
"C: \ Program filesvim \ vim72 \ gvim.exe"-p -- remote-tab-silent "% *"
4) enter the name on the vim tab.
5) select two files at the same time, right-click them, and click the vim tab. Haha, OK ~~
In this way, the original functions will not be affected, but the functions we want will be realized.
II. The second method is actually writing a script. In fact, this method is also feasible in Linux, but it is just a shell.
1) create a new batch file, tab_vim.bat
2) write in the file:
@ Echo off
Start/B c: \ Vim \ vim72 \ gvim.exe-p -- remote-tab-silent "% ~ F1"
Exit
3) select this file in the open mode ~~~, Is it very troublesome to choose each time? Don't worry, once you select the file with the corresponding extension, our Bat program will appear directly in the Open Method list ~
OK, that's it ~~