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

Custom wordcount formatters aren't autoloaded #1896

Closed
shayneholmes opened this issue Apr 9, 2019 · 0 comments
Closed

Custom wordcount formatters aren't autoloaded #1896

shayneholmes opened this issue Apr 9, 2019 · 0 comments

Comments

@shayneholmes
Copy link
Contributor

environment

  • vim: 8.1.1050
  • vim-airline: 86e73ca
  • OS: MacOS 10.14.3
  • Have you reproduced with a minimal vimrc: no
  • What is your airline configuration: default
    if you are using terminal:
  • terminal: iterm2
  • $TERM variable: xterm256-color
  • color configuration (:set t_Co?): 256
    if you are using Neovim:
    - does it happen in Vim: ???

setup

In .vimrc:

  let g:airline#extensions#wordcount#formatter = 'test'

~/.vim/autoload/airline/extensions/wordcount/formatters/test

function! airline#extensions#wordcount#formatters#test#to_string(wordcount)
  return "foo"
endfunction

actual behavior

Error detected while processing $HOME/.vim/autoload/airline/extensions/wordcount/formatters/test
line 3:
E746: Function name does not match script file name: airline#extensions#wordcount#formatters#test#to_string

expected behavior

Word count is replaced by "foo".

notes

The autoload error is fixed by moving the file to "test.vim", but then the file isn't executed at all, because airline is executing "autoload/airline/extensions/wordcount/formatters/test" instead of including the .vim extension.

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

1 participant