-1

I need to increment/add/renumber numbers (BibTeX keys) selected using regex over several hundred TeX files, maintaining the sequence from one file to the next, when sorted in alphanumeric order.

Files:

latex-01.tex
latex-02.tex
latex-03.tex
etc    

Each file containing something like,

Text ... [bibkey01a] ...
More text [bibkey02] ...

I know it is easily possible to do it on one file. I have found several other similar pages on stackoverflow and other forums, but all deal only with one file at a time.

I could open each file, increment/add/renumber the numbers using TextPastry or Sublime-Evaluate and manually carry over the proper value to the next file and repeat the procedure for all the files.

That is possible but a daunting task when one has several hundred related files that need to have value renumbered in a continuos related way. Also, it would be quite easy to make a mistake and carry over the wrong number.

How to automatically increment/add/renumber numbers in Sublime 3 over many related files in a continuos way?

gsl
  • 1,063
  • 1
  • 16
  • 27
  • Care to share why the downvote? Is this question unclear, or not useful? I did spend quite a bit of research before posting it. Please offer advice on how to improve it. – gsl Jan 15 '19 at 14:40

1 Answers1

0

It seems Sublime 3 + extensions is not able to do what I need at the moment.

Of course I can do it with a script. I believe Emacs can do it too, using helm-swoop and wgrep, then, using a replace expression that contains elisp code.

gsl
  • 1,063
  • 1
  • 16
  • 27