Here are the few tips for configuring GVIM to support,

1. Opening multiple files as tab in same GVIM instance
2. To make Windows shortcut keys (Cut, copy , past. etc) work in GVIM.

### Opening multiple files as tab in same GVIM instance

Whenever you a open file from command line using gvim, it will always open that file in a new window. Switching between many windows may be difficult for few. One solution is to open all the files in same window in different tabs.

alias g="gvim --remote-tab"


This command opens the given file as tab in already opened instance of GVIM. If no GVIM instance is there, it will new GVIM. You can also add any short cut below command in .bashrc file. Here I have added “g” for opeing files in the same window of GVIM with different tabs. Now you can open any files using the command “g” like below.

$g mytest_file1.txt$ g mytest_file2.txt


Both the files will be opened in the same window in different tabs.

### To make Windows shortcut keys (Cut, copy , paste etc) work in GVIM

Add the below lines in .vimrc file.

source \$VIMRUNTIME/mswin.vim
behave mswin


Now below windows shortcut keys will work in GVIM

CTRL-X  - Cut
CTRL-C  - Copy
CTRL-V  - Paste
Use CTRL-S - saving
CTRL-Z - Undo;
CTRL-Y - Redo
CTRL-A - Select all
CTRL-Tab - Next window
CTRL-F4 - Close window


Happy Editing :)