Skip to content

How to open "a layout" at VimEnter? (namely Neo-tree and Aerial) #3139

Answered by dpetka2001
gacallea asked this question in Q&A
Discussion options

You must be logged in to vote

For me the path always opens where the file is.

For edgy and moving the cursor to file you could do

vim.api.nvim_create_autocmd({ "SessionLoadPost", "UIEnter" }, {
  pattern = { "*.lua", "*.py" },
  group = vim.api.nvim_create_augroup("UIEnter", { clear = true }),
  desc = "Open neo-tree on UIEnter",
  callback = function()
    -- vim.cmd("Neotree")
    require("edgy").toggle()
    vim.schedule(function()
      vim.cmd("wincmd l")    -- lowercase L
    end)
  end,
})

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@gacallea
Comment options

@dpetka2001
Comment options

@gacallea
Comment options

@dpetka2001
Comment options

Answer selected by gacallea
@gacallea
Comment options

@dpetka2001
Comment options

@gacallea
Comment options

@dpetka2001
Comment options

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