Skip to content

Go to first/last sibling #220

Answered by cseickel
fuelen asked this question in Q&A
Mar 28, 2022 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

Interesting. Here is how you can add those mappings:

  require('neo-tree').setup({
    window = {
      mappings = {
        ["J"] = function(state)
          local tree = state.tree
          local node = tree:get_node()
          local siblings = tree:get_nodes(node:get_parent_id())
          local renderer = require('neo-tree.ui.renderer')
          renderer.focus_node(state, siblings[#siblings]:get_id())
        end,
        ["K"] = function(state)
          local tree = state.tree
          local node = tree:get_node()
          local siblings = tree:get_nodes(node:get_parent_id())
          local renderer = require('neo-tree.ui.renderer')
          renderer.focus_node(state, siblings[1

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@fuelen
Comment options

Comment options

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

@glaucocustodio
Comment options

@cseickel
Comment options

@glaucocustodio
Comment options

Answer selected by fuelen
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