Questions tagged [argument-list]

Questions about the usage and the manipulation of the argument list. The argument list is the list of file names you give when starting Vim.

Filter by
Sorted by
Tagged with
2
votes
2answers
49 views

Plugin to edit whole datasets/projects

I'm using vim all the time for text editing these days, and have a particular use case: editing a dataset using successive commands. The main problem, as often, is fixing things, ideally rather ...
0
votes
0answers
28 views

How can I see what arguments vim was invoked with?

Is it possible to see what arguments vim was invoked with when it was run? vim -O foo bar To show -O foo bar, but especially if there are configurations set like -Z?
2
votes
1answer
45 views

How to add files to argument list without adding them to buffer list?

I would like to run some command on each .js file of project. Argument list seems like a perfect usecase for it. :arga **/*.js :argdo 'some_command' The problem is that using :arga **/*.js adds all ....
0
votes
1answer
182 views

Use the arglist without opening the files

When I use the args command it opens the files: :args `find . -name \*.html` I would like to do an operation on the arglist without opening the files at all in a buffer, or either opening them one ...
1
vote
1answer
393 views

How can i get the arglist count?

I am writing a bash script about session management and what I want is if there's something in the arglist not to source the session. But I couldn't find a way to check the length of :args First of ...
3
votes
1answer
1k views

How to call the fzf Ag command with multiple arguments?

The plugin fzf.vim defines the following vim command here: command! -bang -nargs=* Ag call fzf#vim#ag(<q-args>, <bang>0)' the fzt#vim#ag function seems to allow passing all the ag ...
3
votes
1answer
47 views

how to use the number returned by arglistid()

In the doc little is said about this number. Can we retrieve the entire arglist using this number and get all the versions of arglist?
2
votes
2answers
3k views

Handling Complex Arguments in a Vim Command

I am working on a VIM plugin that will require a certain level of complexity for handling arguments passed to a command. :MyCommand -item=banana -command=ls\-ltra -pattern=./* However, I am not sure ...
0
votes
1answer
1k views

Exiting back to normal mode in terminal buffer from Vimscript

<C-\><C-n> is working as (I'd) exepected, but not from a Vimscript. I am trying to make a script that will: open Neovim's :terminal run a python script exit from the terminal input mode ...
3
votes
2answers
301 views

How does double star work in vim?

When I run shopt -s globstar; ls -1 tests/**/Helpers/**/*.php in bash I get: tests/Helpers/Layout.php tests/Helpers/Link.php tests/Helpers/LinksPage.php tests/Helpers/LiqpayRedirect.php tests/Helpers/...
3
votes
2answers
400 views

Passing a # character to the shell in vimscript?

In my previous question, I passed an argument into a Vimscript function and concatenated it into the command line. This works great, but when you pass a string that contains the # character, it balks ...
4
votes
2answers
164 views

Can I run -c in batch mode (without opening the curses display)?

I find myself performing a small shell loop (involving vim) to transform files into the correct line endings for my system. It looks as follows: for i in *; do vim -c 'set ff=dos' -c 'wq' $i; done ...
1
vote
1answer
189 views

How to remove lines matching pattern in all files changed in one editing session?

I'm trying to create function and a mapping to insert/remove breakpoints in python code. So far I got this function! AddBreakPoint() let l:line = line('.') let l:indentChar = ' ' call ...
1
vote
1answer
176 views

navigating multiple files - arguments and buffers

I've been learning vi (as an autodidact) for some weeks. Actually I'm not yet sure about if I'm using vi or vim (does the command vi open vim if vim is installed?). Now I'm trying to edite multiple ...
2
votes
1answer
93 views

Is is possible to change the order of the argument list?

When I have multiple files in the argument list, can I rearrange the order of the list? For example :args [A.md] B.md C.md D.md E.md F.md is there a command/series of commands that gives me :args ...
3
votes
2answers
97 views

Is it possible to add a file to the argument list with in netrw?

I am a heavy user of the argument list and I always have the files which are important for my current task in it. Now I started to use netrw more often to search through the files system. But I can't ...
0
votes
1answer
249 views

Why argdo applies changes only to the last file?

Given the following files with two trailing spaces at the end: $ echo "test1 " > test1.txt; echo "test2 " > test2.txt; echo "test3 " > test3.txt $ hexdump -C *.txt 00000000 74 65 73 74 ...