Yilin-Yang / vim-markbar

Display all accessible marks and their surrounding lines in a collapsible sidebar.
MIT License
191 stars 3 forks source link

Feature request - separate context var by mark type #14

Closed curioussavage closed 5 years ago

curioussavage commented 5 years ago

I think it would be nice to not have any context for File marks but have some for local ones. The only important thing to me for file marks is the file name itself. So there could be g:markbar_num_lines_context_local and g:markbar_num_lines_context_global or whatever you want to call it.

Yilin-Yang commented 5 years ago

Howdy!

This is on my to-do list, though I might not get around to it for a little while (~weeks). I'll ping you once I have something ready for testing!

Yilin-Yang commented 5 years ago

Just pushed some changes to the branch config_context, if you'd like to take a look! Please let me know if you encounter any issues.

To obtain the behavior you mentioned in your first post, try setting this in your vimrc:

let g:markbar_num_lines_context = {
  \ 'around_local': 5,
  \ 'around_file': 0,
  \ }
Yilin-Yang commented 5 years ago

I've been using the changed code myself for a little while and verified that it works (at least for me), so I've gone ahead and merged this into the master branch. Let me know if there's anything else!

curioussavage commented 5 years ago

Awesome! I'll try and test it out asap!

update: works great for me