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

  • Home
  • SEARCH
  • 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 883253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:33:26+00:00 2026-05-15T12:33:26+00:00

In Vim, you can make it so each time you write FF on insert

  • 0

In Vim, you can make it so each time you write “FF” on insert mode changes to some code by using:

:iab FF for ( int i = 0 ; i < n ; i++ )

But is there any way to use this with arguments? Something like C’s #defines, so if I write

FF(e, 10)

It becomes:

for ( int e = 0 ; e < 10 ; e++ )
  • 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-15T12:33:27+00:00Added an answer on May 15, 2026 at 12:33 pm

    Take a look at SnipMate (a vim plugin). You won’t get arguments, but upon expansion of an abbreviation, it allows you to tab through modifiable areas. In the for example, you’ll be brought to the i first, can edit it to be e, and it will change it to e in all areas of the for declaration. Then simply tab to the next area you’d like to change.

    From the docs:

    snipMate.vim aims to be an unobtrusive, concise vim script that implements some of TextMate’s snippets features in Vim. A snippet is a piece of often-typed text that you can insert into your document using a trigger word followed by a .

    For instance, in a C file using the default installation of snipMate.vim, if you type "for" in insert mode, it will expand a typical for loop in C:

    for (i = 0; i < count; i++) {
    
    }
    

    To go to the next item in the loop, simply over to it; if there is repeated code, such as the "i" variable in this example, you can simply start typing once it’s highlighted and all the matches specified in the snippet will be updated.

    The following is a nice helpful change to remap tab and s-tab to c-d and c-a, in case you don’t want to lose the functionality of tab (in ~/.vim/after/plugin/snipMate.vim):

    """ino <silent> <tab> <c-r>=TriggerSnippet()<cr>
    """snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
    """ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr>
    """snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr>
    """ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
    ino <silent> <c-d> <c-r>=TriggerSnippet()<cr>
    snor <silent> <c-d> <esc>i<right><c-r>=TriggerSnippet()<cr>
    ino <silent> <c-a> <c-r>=BackwardsSnippet()<cr>
    snor <silent> <c-a> <esc>i<right><c-r>=BackwardsSnippet()<cr>
    ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

No related questions found

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.