尋找與取代
插件信息
尋找與取代可搜尋目前文件正文(包括表格)中的純文字。它支援區分大小寫、全字匹配、切換匹配項,以及取代目前或全部匹配項。
暫不支援頁首、頁尾、評論、繪圖、規則運算式、格式搜尋和特殊字元。
外掛模式
安裝
Shell
pnpm add @univerjs/find-replace @univerjs/docs-find-replaceShell
npm install @univerjs/find-replace @univerjs/docs-find-replaceShell
yarn add @univerjs/find-replace @univerjs/docs-find-replaceShell
bun add @univerjs/find-replace @univerjs/docs-find-replace使用
TypeScript
import { LocaleType, mergeLocales, Univer } from '@univerjs/core'import { UniverDocsFindReplacePlugin } from '@univerjs/docs-find-replace'import FindReplaceZhTW from '@univerjs/find-replace/locale/zh-TW'import '@univerjs/find-replace/lib/index.css'const univer = new Univer({ locale: LocaleType.ZH_TW, locales: { [LocaleType.ZH_TW]: mergeLocales(FindReplaceZhTW), },})univer.registerPlugin(UniverDocsFindReplacePlugin)鍵盤快速鍵
Ctrl/Cmd + F:開啟尋找Ctrl/Cmd + H:開啟取代Enter/Shift + Enter:下一個 / 上一個匹配項Escape:將焦點返回文件
你覺得這篇文檔如何?