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 9186959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:39:24+00:00 2026-06-17T19:39:24+00:00

Vim’s Utl plugin offers a convenient way for doing web queries from within the

  • 0

Vim’s Utl plugin offers a convenient way for doing web queries from within the editor. When called directly from the command line, a dictionary lookup can be done like this:

:Utl ol http://dict.leo.org/?search=my+search+term

What’s the correct way for defining a custom command with the same purpose (my+search+term being user input)? I can’t seem to get <f-args> right with this one:

command -nargs=1 SearchLeo :exe ":Utl ol http://dict.leo.org/?search=" . expand("<f-args>")

What’s the correct way of defining function arguments here? Or should I turn this into a more complete function? Thanks!

  • 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-06-17T19:39:25+00:00Added an answer on June 17, 2026 at 7:39 pm
    1. You probably don’t need expand() here; it’s just for expanding globs (like *.txt) or the special variables like % for the current file.
    2. You’re quoting the argument twice, once through <f-args> (<q-args> would be slightly more correct, though it only matters with a variable number of arguments), once literally.

    Use this:

    command -nargs=1 SearchLeo :exe ":Utl ol http://dict.leo.org/?search=" . <q-args>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When Vim is started, it grabs many of the environment variables from the operating
Does VIM (or macvim) have a way to show a code-folding boxtree/circletree like Notepad++?
VIM seems integrated to the terminal. Can I open a remote file from the
Vim completes words and lines with CTRL-X P and CTRL-L. There's a Emacs plugin
VIM fugitive plugin: how to run :Gwrite command with a -f parameter to force
Vim is very productive editor and I enjoy using it everyday, but I've found
VIM: Does anyone know how to put a string from an input dialog in
Vim is my preferred text editor when I program, and thus I always run
In Vim, What is the best (portable and fast) way to read output of
In Vim editor I opted ]I on a function (in C++ code). This presented

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.