Skip to content

[Bookmarks] save and toggle list #1673

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

Closed
jinleileiking opened this issue Oct 20, 2022 · 11 comments
Closed

[Bookmarks] save and toggle list #1673

jinleileiking opened this issue Oct 20, 2022 · 11 comments
Labels

Comments

@jinleileiking
Copy link

  1. Save bookmarks -- when nvim exits, the bookmarks are gone
  2. A shortcut cmd to toggle bookmarks list in nvim-tree window like nerdtree
@alex-courtis
Copy link
Member

I might split this feature request in two.

1 is clear

2 What does the toggle do? Does it hide all nodes of the tree that are not marked?

@alex-courtis
Copy link
Member

/nudge @jinleileiking

@alex-courtis alex-courtis changed the title [BOOKMARK] features [Bookmarks] save and toggle list Oct 31, 2022
@alex-courtis alex-courtis added the QOL Quality Of Life Improvement label Oct 31, 2022
@pr4th4m
Copy link
Contributor

pr4th4m commented Nov 1, 2022

Not sure how this is possible - can we display bookmarked files/directories as favourites in top section of nvim tree ?
ex

example/..
- - bookmarks/favourites
  - go.mod
  - README.md
------------------------
+ - .git
+ - appengine-hello
+ - gotypes
+ - hello
+ - outyet
+ - stringutil
+ - template
  - go.mod
  - go.sum
  - LICENSE
  - README.md
  - ◯ tmp

@alex-courtis
Copy link
Member

Not sure how this is possible - can we display bookmarked files/directories as favourites in top section of nvim tree ?

I'm not sure that's a direction we want to take nvim-tree, which is simply a file browser. There are no plans for any sort of alternate views.

Perhaps we could instead go in a direction like #1692 with a different window / plugin.

@kagbodji
Copy link

kagbodji commented Nov 4, 2022

I like your idea of using a separate view for things like buffers / bookmarks. Perhaps nvim-tree could expose bookmarked files via some API, and another plugin can render those?

@alex-courtis
Copy link
Member

I like your idea of using a separate view for things like buffers / bookmarks. Perhaps nvim-tree could expose bookmarked files via some API, and another plugin can render those?

See :help nvim-tree.api.marks for get API.

@jinleileiking
Copy link
Author

jinleileiking commented Nov 8, 2022

I might split this feature request in two.

1 is clear

2 What does the toggle do? Does it hide all nodes of the tree that are not marked?

  1. Just like this:

default:

Mark1
Mark2
Mark3

-----

Mark1
     + dir 1
     + dir 2

When hit m


Mark1
     + dir 1
     + dir 2


m: show or hide bookmark list.

We need this because if you have a long list of bookmarks, it is hard to see the treelist. Hide the bookmark list is for see the dirs clearly.

Feature 1 is more important than feature 2.

@alex-courtis
Copy link
Member

  1. Just like this

Just like this:
default:

Mark1
Mark2
Mark3

That would work if we went with a separate window solution: #1692

In the meantime, we could implement a live toggle filter like:
M : toggle_bookmarked
Would that suit your use case?

@jinleileiking
Copy link
Author

Yes! Waited it done.

@alex-courtis
Copy link
Member

We have successfully added toggle filters filters.git_clean, filters.no_buffer for #1692 and similar.

Splitting feature.

This was referenced Dec 22, 2022
@alex-courtis
Copy link
Member

#1850 #1851

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants