Wednesday, July 18, 2018

Re: Remember last command?

On 2018-07-18 12:23, Bill Tugger wrote:
> I often have to make small edits in several files. I need to
> display each file as I make the changes so automated tools don't
> work.

You're asking for automating something you say can't be automated.

If the actions *are* repeatable, you can record a macro and then play
it back on each file.

Or, if the edits are predictable, you can even do them all in one
fell swoop with something like

:set hidden
:argdo g/DEBUG_IT_NOW/s/^/#
[review the changes and optionally write them all out with]
:wall

to comment out each "DEBUG_IT_NOW" line with "#".

If you just want to open each file to a particular location, you can
do something like

:autocmd BufRead ./* 0/DEBUG_IT_NOW

This will jump to the first line containing "DEBUG_IT_NOW" whenever
you open a new file matching your filespec (adjust from "./*" to
whatever you're interested in).

To be more helpful, it would be useful to know why you think that
automated tools can't do the job, as well as what the more precise
steps are that are involved (decisions you have to make, the types of
edits you're doing, etc)

-tkc

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment