6

Often enough a text file is structured as a collection of blocks or cells of some kind. E.g., slides in a Tex Beamer presentation, bibtex items, function definitions, etc.

I wonder if vim can facilitate highlighting of the current "cell" only, letting thereby the part I'm currently working on to stand out from the rest?

vbond
  • 61
  • 1
  • 9
    Maybe start from this plugin: https://github.com/junegunn/limelight.vim – VanLaser Mar 14 '17 at 11:39
  • 1
    @VanLaser: awesome plugin, almost does the job. I can definitely continue from there. Thank you for the advice! – vbond Mar 14 '17 at 12:20
  • 1
    @vbond if you decided to use limelight, please do post an answer about using it! – muru Mar 16 '17 at 05:49
  • @vbond if you could provide an example of the syntax and it is a regexp you can write your own highlighting – Steve May 09 '18 at 04:34
  • 1
    @vbnod did you manage to extend limelight into what you wanted? Is the code available? – chicks Aug 07 '18 at 02:10
  • @Rich: if you know how to apply the techniques given in the referenced question, I would be happy if you could post an answer here, e.g. using following beamer example file: https://github.com/josephwright/beamer/blob/master/doc/examples/a-conference-talk/beamerexample-conference-talk.tex#L91-L126. IMHO the question is clear enough what is meant. There is actually a related but unanswered issue on github for the plugin limelight: limelight.vim/issues/38. – Hotschke Sep 12 '18 at 06:11
  • @Hotschke I’ve retracted my close vote. Might be worth editing an example into the question? – Rich Sep 12 '18 at 06:26
  • @Rich. Sure, a short beamer example code, possibly with a faked screenshot of what it should look like, would make the question even clearer. – Hotschke Sep 12 '18 at 06:53

1 Answers1

0

I guess you need to focus, like this:

sample

laktak
  • 2,933
  • 13
  • 27
  • Thanks @laktak. Nice one, although not quite what I meant: I need to highlight a part with all the syntax items in it. Nevertheless, good to know about the focus too. – vbond Mar 15 '17 at 10:57
  • You could try to look at http://vimawesome.com or update your question with an example. – laktak Mar 15 '17 at 13:19