Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 401355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:01:35+00:00 2026-05-12T17:01:35+00:00

In vim (and bash), you can specify alternatives in filenames, eg: :arga project/html/{index,sitemap}.html This

  • 0

In vim (and bash), you can specify alternatives in filenames, eg:

:arga project/html/{index,sitemap}.html

This expands to “project/html/index.html” and “project/html/sitemap.html” (the :arga appends them both to the argument list; you can get to them with :n).

Now, vim already does some filename completion on this, with TAB, by cycling through the possibilities. For the above example, it would show the index one, then the sitemap one, then back to the original text.

I to be able to type this much:

:arga project/html/{in

and press TAB, and have it complete (even though I’m in the middle of a brace):

:arga project/html/{index.html

and have tab-completion also work for the next one, from project/html/{index.html,sit to project/html/{index.html,sitemap.html.

Is there already an option in vim to do this? If not, how would you implement it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:01:36+00:00Added an answer on May 12, 2026 at 5:01 pm

    If this is possible, you’ll have to define your own :Arga command and to specify your own expansion function. However as vim has a few things hard-coded in regard of command-line completion, I can’t guaranty you that this is possible.

    You can have a look at my :SearchIn* commands for examples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today's Daily Vim says this: Assuming you're using the bash shell, the following can
In VIM one can run a Bash command with :!<command> . How can one
I run vim in a full-screen bash terminal with transparency enabled. (This is a
When I open some bash script files with vim it sometimes identifies them as
When I try to read bash history into vim, I get nothing. :r !history
I'm very fond of vim and really would like to enhance my bash experience
ViM has this option hlsearch where a searched string is displayed in highlight mode
In Vim editor I opted ]I on a function (in C++ code). This presented
How can I set vim to see my ruby rvm install on ubuntu. rvm
I'm slowing getting to know Vim and Bash shell scripting and am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.