Far——Sublime风格的查找和替换
Far – Sublime Inspired Find and Replace

原始链接: https://github.com/ibilalkayy/far

far 代表 Find And Replace —— 一个快速、灵活的命令行工具,用于在文件和文件夹中搜索和替换文本。🔍 在文件或文件夹中查找文本 ✏️ 快速轻松地替换文本 🎯 针对特定文件、目录或 glob 模式 ⚙️ 可选的预演支持(即将推出) 🧠 智能大小写支持(例如 Foo → Bar,FOO → BAR)💡 灵感来自 Sublime Text 的查找和替换 git clone https://github.com/ibilalkayy/far.git cd far cargo build --release far --find "Foo" --replace "Bar" --target "./src/**/*.rs" 采用 Apache-2.0 许可证。欢迎提交请求!如果您有改进或功能方面的建议,请随时提出 issue。

这个Hacker News帖子讨论了“Far”,一款受Sublime Text启发的新的查找和替换工具。讨论很快转向与其他工具和类似程序的比较。 许多用户回忆起Far Manager,一款类似Norton Commander的Windows文件管理器,称赞其双面板设计和键盘快捷键能够高效地进行文件操作,尤其是在Windows中`find`和`cat`命令功能有限的情况下。一些人提到了Far Manager可以通过far2l在Linux和Mac上使用。 然后,用户们开始辩论Far相对于`rpl`、`sed`和`perl`等命令行工具的实用性,质疑其优势。一些人认为Far为基本的查找和替换任务提供了更简单的语法,对不太熟悉正则表达式的用户更有吸引力。还提到了`sad`和`sd`等替代方案,以及Facebook的`fastmod`。一位用户幽默地指出,该项目的名称避免了不幸的首字母缩写“fart”(屁)。

原文

far stands for Find And Replace — a fast, flexible command-line tool to search and replace text across files and folders.

  • 🔍 Find text in files or folders
  • ✏️ Replace text quickly and easily
  • 🎯 Target specific files, directories, or glob patterns
  • ⚙️ Optional dry-run support (coming soon)
  • 🧠 Smart casing support (e.g. FooBar, FOOBAR)
  • 💡 Inspired by Sublime Text’s find & replace
git clone https://github.com/ibilalkayy/far.git
cd far
cargo build --release
far --find "Foo" --replace "Bar" --tartget "./src/**/*.rs"

Licensed under the Apache-2.0 License.

Pull requests are welcome! If you have suggestions for improvements or features, feel free to open an issue.

联系我们 contact @ memedata.com