marks.nvim icon indicating copy to clipboard operation
marks.nvim copied to clipboard

feat: add toggle_mark

Open yehuohan opened this issue 2 years ago • 4 comments

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.

yehuohan avatar Aug 29 '22 16:08 yehuohan

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.

chentoast avatar Sep 06 '22 23:09 chentoast

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.

yehuohan avatar Sep 10 '22 14:09 yehuohan

@chentoast Would it be possible to merge this?

kamack38 avatar Apr 01 '23 11:04 kamack38

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

goetzc avatar Apr 11 '23 00:04 goetzc