Skip to content

Neotree always visible? #679

Answered by pysan3
fandangos asked this question in Q&A
Jan 4, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

I think both are achievable with autocmds.

  1. How can Neotree opens by default when starting nvim?

First of all, if you launch (a barebone) nvim with a dot nvim . at any directory, nvim will open Netrw, a built-in file manager, to give a glance on the folder structures.

Neo-tree has a fuctionality of hijacking this behavior to make neo-tree appear instead of netrw which can be configured with config.filesystem.hijack_netrw_behavior = Options see here.

If you want to go even further, and make neo-tree appear when just running nvim, BUT NOT when nvim random-file-name.txt, you can add the following autocmd to somewhere in your config. FYI, vim.fn.argc() counts the number of command line argum…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@fandangos
Comment options

@AgustinOrdonez
Comment options

@pysan3
Comment options

@AgustinOrdonez
Comment options

Answer selected by fandangos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants