Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function name can start with '_' #9

Closed
xieshiyao opened this issue Jul 21, 2019 · 3 comments
Closed

Function name can start with '_' #9

xieshiyao opened this issue Jul 21, 2019 · 3 comments

Comments

@xieshiyao
Copy link

xieshiyao commented Jul 21, 2019

I got the error shown in the picture in my .vimrc, but actually, this function works fine with either vim or neovim. I know that (neo)vim's document eval.txt says that a function name must start with a capital, but I think it's just a problem with that document.

Screenshot from 2019-07-21 11-14-41

I start the function name with _ for two reasons:

  1. This way, it will never conflict with functions defined by plugins I installed

  2. I map it to some keys, so will never need to call it by name and I don't want to see any autocompletion about it when I type :call V<Tab>


After readinginit.vim written by someone else, I realize that what I should do is to apply :s/_/s:/to my function name. But I still consider this as inconsistency between implementaion and document. What do you think about it?
@justinmk

@iamcco
Copy link
Owner

iamcco commented Jul 21, 2019

This error is throw by https://github.com/vim-jp/vim-vimlparser, i think @tyru should also have a look at on this.

@tyru
Copy link
Contributor

tyru commented Jul 21, 2019

@iamcco please file issue if that's a vimlparser's bug.

@tyru
Copy link
Contributor

tyru commented Jul 21, 2019

Ah okay, I got it.
I created issue. vim-jp/vim-vimlparser#133

@iamcco iamcco closed this as completed in 3323872 Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants