Skip to content

feat: add mark capabilites#612

Closed
kyazdani42 wants to merge 1 commit into
masterfrom
feat/add-mark-capabilities
Closed

feat: add mark capabilites#612
kyazdani42 wants to merge 1 commit into
masterfrom
feat/add-mark-capabilities

Conversation

@kyazdani42

@kyazdani42 kyazdani42 commented Sep 4, 2021

Copy link
Copy Markdown
Member

this feature add marking capabilities in nvim-tree.

  • Binding is m for toggle the mark of a node, M to disable all the current marks
  • a new NvimTreeMarkedFile highlight group was added, green by default
  • get the list of the marks with require'nvim-tree.marks'.get_marks() which will return a list of the tree nodes which you can do anything you want with.
  • toggle a mark with require'nvim-tree.marks'.toggle_mark()
  • disable all marks with require'nvim-tree.marks'.disable_all()

fixes #51 and #221 and #595

TODO:

  • add example usage for moving multiple files.

@kyazdani42 kyazdani42 force-pushed the feat/add-mark-capabilities branch from e2892ca to 05eff71 Compare September 4, 2021 10:57
@kyazdani42 kyazdani42 force-pushed the feat/add-mark-capabilities branch 2 times, most recently from 149f16e to fb92091 Compare September 26, 2021 10:11
@kyazdani42 kyazdani42 force-pushed the feat/add-mark-capabilities branch 2 times, most recently from 123b22c to 2635e0f Compare October 9, 2021 09:07
@kyazdani42 kyazdani42 force-pushed the feat/add-mark-capabilities branch from 2635e0f to f5dc79c Compare October 10, 2021 13:51
@kyazdani42 kyazdani42 force-pushed the feat/add-mark-capabilities branch from f5dc79c to 79ecefa Compare October 30, 2021 11:54
@GabeDuarteM

Copy link
Copy Markdown

Is documentation the only thing blocking this?

@kyazdani42

Copy link
Copy Markdown
Member Author

yes. I'll write it this weekend.

@kyazdani42 kyazdani42 force-pushed the feat/add-mark-capabilities branch 2 times, most recently from b08f869 to 67c5b0e Compare November 27, 2021 15:04
@kyazdani42 kyazdani42 force-pushed the feat/add-mark-capabilities branch from 67c5b0e to dc709b4 Compare November 28, 2021 14:28
@sandangel

Copy link
Copy Markdown

hi, let me know if I could help. I also need this feature.

@kyazdani42

Copy link
Copy Markdown
Member Author

hi @sandangel, i'll try to finish this asap, just missing some example docs on how to use it

@kyazdani42 kyazdani42 mentioned this pull request Dec 24, 2021
@shubham-cpp

shubham-cpp commented Jan 1, 2022

Copy link
Copy Markdown

Also one more interesting feature with marks would be to add marks using regex/pattern.
Lets say we have a command NvimTreeMarkFilePattern which will prompt us to input a pattern and then automatically mark all the files that match a pattern.

Interesting Use cases: Mark all python files(pattern: \.py$) or delete non json files(pattern: (\.json$)@!)
Note: these patterns are vim regex

@vcraescu

Copy link
Copy Markdown

Hi!

What is the status of this?

Thanks!

@kyazdani42

Copy link
Copy Markdown
Member Author

hi @vcraescu.
I have completely forgot about it, and there are too many conflicts, i believe the mark.lua file can be copied but the rest of implementation should be rewritten. I'll do it when i have some time if someone doesn't do it first.

@sandangel

Copy link
Copy Markdown

hi, how could I help implement this from the PR you made?

@kyazdani42

Copy link
Copy Markdown
Member Author

hi @sandangel. Copy the marks file, and reimplement the mappings + the rendering logic

@kyazdani42

Copy link
Copy Markdown
Member Author

closing in favor of #1412

@kyazdani42 kyazdani42 closed this Jul 10, 2022
@kyazdani42 kyazdani42 deleted the feat/add-mark-capabilities branch July 10, 2022 09:40
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

Successfully merging this pull request may close these issues.

Few feature requests

5 participants