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

Start vim on a folder vim . #262

Closed
dadaphl opened this issue Nov 6, 2021 · 2 comments
Closed

Start vim on a folder vim . #262

dadaphl opened this issue Nov 6, 2021 · 2 comments

Comments

@dadaphl
Copy link

dadaphl commented Nov 6, 2021

I would like vim to display a full-window of chadtree automatically when opening vim with a folder as argument (vim .) or opening a folder from within vim (:e .). I'm used to this behavior form NERDTree

Without chadtree
vim .
Screenshot from 2021-11-06 15-18-36

With NERDTree
vim .
Screenshot from 2021-11-06 15-27-11

With chadtree
Screenshot from 2021-11-06 15-19-19

@declancm
Copy link

declancm commented Dec 16, 2021

Try adding the following to your .vimrc as it worked for me

autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') |
    \ execute 'CHADopen' | execute 'cd '.argv()[0] | endif

@dadaphl
Copy link
Author

dadaphl commented Dec 18, 2021

Thank you very much! That solves the issue for me.

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

2 participants