尋找與取代
插件信息
查詢替換在當前文件正文中搜尋純文字,表格中的文字也在搜尋範圍內。它支援區分大小寫、全字匹配、在匹配項之間移動,以及替換當前匹配項或全部匹配項。
不支援頁首、頁尾、評論、繪圖、正規表示式、按格式搜尋和特殊字元。
外掛模式
安裝
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:將焦點返回文件
你覺得這篇文檔如何?