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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:48:25+00:00 2026-06-14T22:48:25+00:00

The vimscript help files state that when defining a user function: The function name

  • 0

The vimscript help files state that when defining a user function:

The function name must start with an uppercase letter, to avoid
confusion with builtin functions.

This is enforced except in the following cases that I discovered by looking at other’s code.

"This should not work.
"But it does as long as the function is in a file called 'overrides.vim'.
function! overrides#name() abort
  echo 'Test overrides\name'
endfunction

"This should not work either.
"But it does as long as the file above is in a folder called 'plugin'.
function! plugin#overrides#name() abort 
  echo 'Test plugin\overrides\name'
endfunction

let stupid = {}
"This should not work.
"But it does aslong as the stupid Dictionary is defined.
function! stupid.name() abort
  echo 'Test stupidname'
endfunction


call overrides#name()
call plugin#overrides#name()
call stupid.name()

I looked everywhere for anything that would explain this syntax. I know this works now. What I am very curious about is, for those of you have used this syntax, where did you learn about it?

Are there other vimscript functionality that are not mentioned anywhere in the help files?

  • 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-14T22:48:26+00:00Added an answer on June 14, 2026 at 10:48 pm

    This naming syntax is for autoload function. Type :help autoload-functions for help.

    AUTOMATICALLY LOADING FUNCTIONS ~
                                                              *autoload-functions*
    When using many or large functions, it's possible to automatically define them
    only when they are used.  There are two methods: with an autocommand and with
    the "autoload" directory in 'runtimepath'.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm pretty confused by one of the subtleties of the vimscript extend() function. If
[using MacVim 7.3 on OS X Lion] I have a vimscript function which runs
I have a bunch of ZIP files that are in desperate need of some
I'm a pretty new Vim user and I've found that its learning curve is
I'm going to need to push and pull files from a SharePoint site that
Good afternoon, I wish to have a script that will look for all files
There is a vbscript that we must run to consolidate information gathered in a
I have a function that reads a text file containing two lines, it reads
I am trying to compose a Vim script function to help format where the
I'm trying to learn vimscript by writing a small plugin to display marks using

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.