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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:53:33+00:00 2026-06-14T11:53:33+00:00

In vimscript, function definitions can take an abort argument. To quote the docs, When

  • 0

In vimscript, function definitions can take an abort argument. To quote the docs,

When the [abort] argument is added, the function will
abort as soon as an error is detected

This leads me to seriously question what exactly functions normally do when they encounter errors. Stumble blindly forth into the darkness?

What does abort actually do? Does it break all of the try...endtry blocks? When do you want to use it, and when do you want to avoid 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-06-14T11:53:35+00:00Added an answer on June 14, 2026 at 11:53 am

    As glts mentioned, all the complex details are documented at :help except-compat, and the answer basically boils down to backwards compatibility and the inherent flexibility of Vimscript.

    There’s a natural progression from recorded macros to mappings to custom functions. With that in mind, it may make sense that when a command in a function causes an error (e.g. a %s/foo/bar/ that is not matching and missing the e flag), processing should continue.

    On the other hand, when you write “industrial-grade” mappings, you’ll almost always use a try..catch block inside your function call hierarchy, anyway (to avoid any multiline-errors Error detected while processing function: ..., and instead show a nice error message to the user).

    So in practice, most published plugins do not use abort, but try..catch, and for quick, off-the-cuff stuff, you typically don’t care too much about error handling, anyway.

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

Sidebar

Related Questions

[using MacVim 7.3 on OS X Lion] I have a vimscript function which runs
I'm pretty confused by one of the subtleties of the vimscript extend() function. If
I have a Vimscript function which is called on BufWritePre to check the integrity
Is there a way I can query from within Vim information about user-defined vimscript
how to call javascript function from vbscript. i wrote like this <script type=text/vbscript> jsfunction()
Can I call a Classic ASP vbscript function and have it return html? I
I have a function in VBScript, what is it doing? how can I simplify
Is there a function in Vimscript or a convention that allows you to simply
I have a function in my script that's supposed to take in a string
How would I go about completing the following function in vimscript? fun! Foo() let

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.