Skip to content

Conversation

@doronbehar
Copy link
Contributor

Hi!

Related to #2, I noticed that if I want to set:

autocmd BufReadPost <my cmd>

With prj, it won't run <my cmd> because the file has already been read when VimEnter event was triggered. Hence I think it'd be simply better to call prj#reload() right there on prj.vim.

I also added some more changes which perhaps you'd appreciate.

Thanks for writing this plugin.

Regards.

@emersonmx
Copy link
Owner

Thanks for the contribution, but even with this PR the <my cmd> was not executed.
Can you make a minimal example?

I cherry picked some commits 😀

@doronbehar
Copy link
Contributor Author

Can you make a minimal example?

Something like this perhaps will work:

mkdir vim-test
cd vim-test
mkdir -p nvim/pack/test/start
git clone https://github.com/doronbehar/vim-prj nvim/pack/test/start/prj
mkdir project
cd project
echo "test:" > Makefile
echo "    echo hello world" >> Makefile
echo "au! BufReadPost Makefile au BufWritePost <buffer> !make test" > .prjrc
env XDG_CONFIG_HOME=$PWD/.. nvim Makefile

And try to test a :write while editing Makefile, and see that prj is asking for a permission to load the .prjrc file.

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

Successfully merging this pull request may close these issues.

2 participants