Question: How to replace `getcwd` with a public function exposed by another plugin?
- Dominant language
- Vim Script
- Stars
- 5.4k
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
This is a follow-up of [a question raised in another project](https://github.com/airblade/vim-rooter/issues/119).
Hey! I'm new to Vim and I am trying to integrate [a public function from another library](https://github.com/airblade/vim-rooter#using-root-finding-functionality-in-other-scripts) by replacing [`getCwd` specfied in `startify_lists`](https://github.com/mhinz/vim-startify/blob/master/doc/startify.txt#L161) with [the function defined in another plugin](https://github.com/airblade/vim-rooter/blob/master/plugin/rooter.vim#L51-L54).
Here is what my setup is:
- Installed plugins using vim-plug
- Assigning value to `startify_lists` in `.config/nvim/init.vim` (which I believe [could be wrong](https://github.com/airblade/vim-rooter/issues/119#issuecomment-799363382))
I am struggling to integrate these two plugins. When I try to use that function NVim tells me that it cannot find it.

Here is what the code looks like:

Am I defining `startify_lists` in the wrong file? If yes, where can I define it instead? I am unable to understand what I'm doing wrong.
Contributor guide
Research direction
Start with the `startify_lists` section in `doc/startify.txt`, then compare the referenced `init.vim` setup with the function definition in `plugin/rooter.vim`. Confirm how plugin loading affects access to the function; done means documenting the correct configuration location and integration steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vim
- Domain
- tooling
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100