Skip to content

feat: add toggle_mark#80

Open
yehuohan wants to merge 1 commit intochentoast:masterfrom
yehuohan:feat-toggle-mark
Open

feat: add toggle_mark#80
yehuohan wants to merge 1 commit intochentoast:masterfrom
yehuohan:feat-toggle-mark

Conversation

@yehuohan
Copy link

@yehuohan yehuohan commented Aug 29, 2022

Add toggle_mark command to toggle inputed mark at current line like what kshenoy/vim-signature (it uses g:SignatureMap.Leader to toggle inputed mark) does.

@chentoast
Copy link
Owner

Can you please describe really quickly the intended usecase for this; ie, what would this allow that a regular toggle could not? Thanks for the PR.

@yehuohan
Copy link
Author

Can you please describe really quickly the intended usecase for this; ie, what would this allow that a regular toggle could not? Thanks for the PR.

Sure.
This PR add the toggle_mark, which means the toggle command need a inputed mark to perform its functionality.
Under the setup with require('marks').setup{mappings = { toggle_mark = 'm'}} as an example:
When press 'ma':

  • If there is no mark a on current line, it will add a mark a on the current cursor position.
  • If there is a mark a on current line, it will remove the mark a.

@kamack38
Copy link

kamack38 commented Apr 1, 2023

@chentoast Would it be possible to merge this?

@goetzc
Copy link

goetzc commented Apr 11, 2023

This would be great to have! Makes total sense, specially after having used this feature with kshenoy/vim-signature.

@cameronr
Copy link

fwiw, I'd also love to have this!

@kamack38
Copy link

fwiw, I'd also love to have this!

It seems that this project has been abandoned. I'm currently using https://github.com/2KAbhishek/markit.nvim

@cameronr
Copy link

cameronr commented Jun 15, 2025

I tried markit earlier but I don't need the bookmark persistence and the project root detection (in Bookmarks:get_root_dir()) uses vim.fn.system which blocks the ui thread until it's done. Obviously, it's not for very long but I don't want any blocking for features I'm not using. The main thing I miss is the ability to toggle a bookmark with the same key combo.

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.

5 participants