Replace in multiple files - graphical tool for Linux

后端 未结 6 1530
难免孤独
难免孤独 2021-02-18 15:51

It needs to be graphical. No sed, awk, grep, perl, whatever. I know how to use those and I do use them now, but I need to cherry-pick each replace in 300+ files.

I want

相关标签:
6条回答
  • 2021-02-18 16:23

    I think regexxer is exactly what you're looking for:

    Regexxer

    regexxer is a nifty GUI search/replace tool featuring Perl-style regular expressions. If you need project-wide substitution and you’re tired of hacking sed command lines together, then you should definitely give it a try.

    See also the screenshot, looks a lot like what you're describing:

    0 讨论(0)
  • 2021-02-18 16:28

    Lately Kate (if you use KDE) can do it, but in a very tricky way. Go to "Edit>Search in Files", and choose the folder within which your files exist.

    The trick is that only after the search results appear, you will find a text box and a button called "Replace checked". This button will do what you want.

    0 讨论(0)
  • 2021-02-18 16:30

    jEdit does exactly what you need. It is written in Java and works well in Linux, Windows and OS X (probably other operating systems also).

    0 讨论(0)
  • 2021-02-18 16:33

    If you are a KDE user there's also kfilereplace.

    0 讨论(0)
  • 2021-02-18 16:35

    Emacs + dired + query-replace-regexp

    For complete recipe follow this link (it's rather long, covering all possible alternatives),

    0 讨论(0)
  • 2021-02-18 16:39

    I use gVim for this task all the time. I open up all the files at once, then use the commands to perform a subsitution on each file, asking for confirmation. Generally I use < 20 files, so I open them as tabs and use this:

    :tabdo %s/foo/bar/gc
    

    gVim works fine on Windows :) My coworkers often use Textpad to do this same thing, but I'd say gVim is much more efficient at it.

    0 讨论(0)
提交回复
热议问题