@@ -80,21 +80,23 @@ char *(remap_choices[]) =
8080 "Do not remap keys for Windows behavior" ,
8181 "Remap a few keys for Windows behavior (CTRL-V, CTRL-C, CTRL-F, etc)" ,
8282};
83- int remap_choice = (int )remap_win ;
83+ int remap_choice = (int )remap_no ;
8484char * remap_text = "- %s" ;
8585
8686enum
8787{
8888 mouse_xterm = 1 ,
89- mouse_mswin
89+ mouse_mswin ,,
90+ mouse_default
9091};
9192char * (mouse_choices []) =
9293{
9394 "\nChoose the way how Vim uses the mouse:" ,
9495 "right button extends selection (the Unix way)" ,
95- "right button has a popup menu (the Windows way)" ,
96+ "right button has a popup menu, left button starts select mode (the Windows way)" ,
97+ "right button has a popup menu, left button starts visual mode" ,
9698};
97- int mouse_choice = (int )mouse_mswin ;
99+ int mouse_choice = (int )mouse_default ;
98100char * mouse_text = "- The mouse %s" ;
99101
100102enum
@@ -155,8 +157,7 @@ get_choice(char **table, int entries)
155157 {
156158 if (idx )
157159 printf ("%2d " , idx );
158- printf (table [idx ]);
159- printf ("\n" );
160+ puts (table [idx ]);
160161 }
161162 printf ("Choice: " );
162163 if (scanf ("%d" , & answer ) != 1 )
@@ -1176,6 +1177,8 @@ install_vimrc(int idx)
11761177 case mouse_mswin :
11771178 fprintf (fd , "behave mswin\n" );
11781179 break ;
1180+ case mouse_default :
1181+ break ;
11791182 }
11801183 if ((tfd = fopen ("diff.exe" , "r" )) != NULL )
11811184 {
@@ -2205,6 +2208,10 @@ print_cmd_line_help(void)
22052208 printf (" Create .bat files for Vim variants in the Windows directory.\n" );
22062209 printf ("-create-vimrc\n" );
22072210 printf (" Create a default _vimrc file if one does not already exist.\n" );
2211+ printf ("-vimrc-remap [no|win]\n" );
2212+ printf (" Remap keys when creating a default _vimrc file.\n" );
2213+ printf ("-vimrc-behave [unix|mswin|default]\n" );
2214+ printf (" Set mouse behavior when creating a default _vimrc file.\n" );
22082215 printf ("-install-popup\n" );
22092216 printf (" Install the Edit-with-Vim context menu entry\n" );
22102217 printf ("-install-openwith\n" );
@@ -2260,6 +2267,28 @@ command_line_setup_choices(int argc, char **argv)
22602267 */
22612268 init_vimrc_choices ();
22622269 }
2270+ else if (strcmp (argv [i ], "-vimrc-remap" ) == 0 )
2271+ {
2272+ if (i + 1 == argc )
2273+ break ;
2274+ i ++ ;
2275+ if (strcmp (argv [i ], "no" ) == 0 )
2276+ remap_choice = remap_no ;
2277+ else if (strcmp (argv [i ], "win" ) == 0 )
2278+ remap_choice = remap_win ;
2279+ }
2280+ else if (strcmp (argv [i ], "-vimrc-behave" ) == 0 )
2281+ {
2282+ if (i + 1 == argc )
2283+ break ;
2284+ i ++ ;
2285+ if (strcmp (argv [i ], "unix" ) == 0 )
2286+ mouse_choice = mouse_xterm ;
2287+ else if (strcmp (argv [i ], "mswin" ) == 0 )
2288+ mouse_choice = mouse_mswin ;
2289+ else if (strcmp (argv [i ], "default" ) == 0 )
2290+ mouse_choice = mouse_default ;
2291+ }
22632292 else if (strcmp (argv [i ], "-install-popup" ) == 0 )
22642293 {
22652294 init_popup_choice ();
@@ -2424,8 +2453,7 @@ NULL
24242453 printf ("\n" );
24252454 for (i = 0 ; items [i ] != NULL ; ++ i )
24262455 {
2427- printf (items [i ]);
2428- printf ("\n" );
2456+ puts (items [i ]);
24292457 printf ("Hit Enter to continue, b (back) or q (quit help): " );
24302458 c = getchar ();
24312459 rewind (stdin );
0 commit comments