Is anyone aware of a command line option or a way to pass in a file to gvim which will use the contents of that file as a list of arguments?
Achieving this without having to populate argv with a list of files.
The problem is that vim is a unix tool which by default assumes that a list of files would be piped in, if there are say 1000 files that need to be opened, however in the windows world there is a limit to how many arguments you can have on the command line. The way to do this on a windows command line is to have a file which contains all the arguments you wish to pass onto the program. I am wondering if gvim provides such an option.
Note: This is to invoke gvim in a windows compatible way ie avoid using extremely long argument lists
A simple solution:
list your files in files
,
file1 file2 file3
open Vim with the command below,
$ vim -c next `cat files`
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.