question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to add the file list to args , then i can use argdo to replace the words .

See original GitHub issue
  • vim or neovim?
    • [ yes] vim
    • neovim
  • Output of vim --version or nvim --version:
  • Output of :echo has("python"):
  • Output of :echo has("python3"):
  • Output of :echo &pythondll(only vim, not neovim):
  • Output of :echo &pythonthreedll(only vim, not neovim):
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version):
  • Output of :echo g:Lf_Debug_Cmd:
  • Output of :echo g:Lf_FilesFromCache:
  • Operating system:
    • Linux
    • Mac OS X
    • [yes ] Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:

Describe your question, feature request, or bug.

I use rg “ leaderf! rg -e xxxxxx ” to search something, it is ok, then i got a list as “grep -nr” how to add the filelist to args , then i can use argdo to replace the words . thanks.

Steps to reproduce

Actual behaviour

Expected behaviour

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Yggdrootcommented, Nov 1, 2020

I add a replacement feature for Leaderf rg, which can be used for refactoring. usage: In normal mode, add the following commands: r : replace a pattern w : apply the changes to buffer without saving W : apply the changes to buffer and save U : undo the last changes applied u is the builtin command.

If the buffer has been changed, :w and :W are the same as w and W in normal mode. Command :Undo is the same as U in normal mode.

PS: popup mode in vim does not support this feature.

0reactions
xaljercommented, Oct 1, 2020

I found a tool looks pretty cool to do replace work: https://github.com/ms-jpq/sad

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using :argdo to change multiple files
To demonstrate, we'll use the example of running the :substitute command across multiple files, then we'll see how to revert or save the ......
Read more >
How to add files to argument list without adding them ...
You can jump to each file in this list. Do not confuse this with the buffer list, which you can see with the...
Read more >
Vim: For Multiple Files: Copy all Text, Replace and Paste
I found out that argdo can execute commands on multiple files. I found many examples to use argdo in replacing text, but I...
Read more >
junegunn/fzf.vim - Add Results to Args list of buffers
It would be nice to use for search and replace with :argdo and :bufdo when you ... Press ALT-A then enter to open...
Read more >
Effective editing of multiple files in Vim | jovica.org
This post will cover a couple of commands which are very useful when you're editing multiple files at once. For each type of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found