{"action":"created","issue":{"url":"https://api.github.com/repos/vim-airline/vim-airline/issues/873","labels_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/873/labels{/name}","comments_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/873/comments","events_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/873/events","html_url":"https://github.com/vim-airline/vim-airline/issues/873","id":112031653,"number":873,"title":"Documentation is wrong about how to configure custom formatter","user":{"login":"sschaef","id":488530,"avatar_url":"https://avatars.githubusercontent.com/u/488530?v=3","gravatar_id":"","url":"https://api.github.com/users/sschaef","html_url":"https://github.com/sschaef","followers_url":"https://api.github.com/users/sschaef/followers","following_url":"https://api.github.com/users/sschaef/following{/other_user}","gists_url":"https://api.github.com/users/sschaef/gists{/gist_id}","starred_url":"https://api.github.com/users/sschaef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschaef/subscriptions","organizations_url":"https://api.github.com/users/sschaef/orgs","repos_url":"https://api.github.com/users/sschaef/repos","events_url":"https://api.github.com/users/sschaef/events{/privacy}","received_events_url":"https://api.github.com/users/sschaef/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-18T17:44:54Z","updated_at":"2016-01-20T22:50:40Z","closed_at":null,"body":"The documentation says:\r\n\r\n```\r\n  \" here is how you can define a 'foo' formatter:\r\n  function! airline#extensions#tabline#foo#format(bufnr, buffers)\r\n    return fnamemodify(bufname(a:bufnr), ':t')\r\n  endfunction\r\n  let g:airline#extensions#tabline#formatter = 'foo'\r\n```\r\n\r\nHowever, after copying the code to my `.vimrc` I got the following error message:\r\n\r\n```\r\nError detected while processing ~/.nvimrc:\r\nline  466:\r\nE746: Function name does not match script file name: airline#extensions#tabline#foo#format\r\n```\r\n\r\nThe formatter doesn't seem to be able to call a local function. How does one now configure a custom formatter?"},"comment":{"url":"https://api.github.com/repos/vim-airline/vim-airline/issues/comments/173388350","html_url":"https://github.com/vim-airline/vim-airline/issues/873#issuecomment-173388350","issue_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/873","id":173388350,"user":{"login":"chrisbra","id":244927,"avatar_url":"https://avatars.githubusercontent.com/u/244927?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisbra","html_url":"https://github.com/chrisbra","followers_url":"https://api.github.com/users/chrisbra/followers","following_url":"https://api.github.com/users/chrisbra/following{/other_user}","gists_url":"https://api.github.com/users/chrisbra/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbra/subscriptions","organizations_url":"https://api.github.com/users/chrisbra/orgs","repos_url":"https://api.github.com/users/chrisbra/repos","events_url":"https://api.github.com/users/chrisbra/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbra/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T22:50:40Z","updated_at":"2016-01-20T22:50:40Z","body":"Drop that into the folder airline/extensions/tabline/formatter and please call the function\r\n`airline#extensions#tabline#formatters#foo#format(bufnr, buffers)`"}}