⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmp_3.applescript

📁 Mac OS X 平台一文本编辑器的源代码
💻 APPLESCRIPT
字号:
(*嵟慜柺偺僂傿儞僪僂偺慖戰斖埻傪 property beginStr 偲 endStr  偵愝掕偝傟偨暥帤楍偱埻傓僗僋儕僾僩丅偙偺椺偱偼丄乽<h1>乿偲乽</h1>乿偱埻傒傑偡丅張棟屻偼丄慖戰斖埻偑偁偭偨応崌偵偼乽</h1>乿偺捈屻偵丄側偐偭偨応崌偼慜偵丄僉儍儗僢僩傪堏摦偟傑偡丅property preMargin 偵0 埲奜偺悢抣傪擖傟傞偲丄張棟慜偺慖戰斖埻偺奐巒埵抲偐傜 preMargin 暥帤暘丄僉儍儗僢僩傪嫮惂揑偵堏摦偱偒傑偡丅*)(* written by nakamuxu. 2005.04.14 *)--property beginStr : "<h1>"property endStr : "</h1>"property preMargin : 0----tell application "CotEditor"	if exists front document then		set {loc, len} to range of selection of front document		if (len = 0) then			set newStr to beginStr & endStr			if (preMargin = 0) then				set numOfMove to count of character of beginStr			else				set numOfMove to preMargin			end if		else if (len > 0) then			set curStr to contents of selection of front document			set newStr to beginStr & curStr & endStr			if (preMargin = 0) then				set numOfMove to count of character of newStr			else				set numOfMove to preMargin			end if		else			return		end if		set contents of selection of front document to newStr		set range of selection of front document to {loc + numOfMove, 0}	end ifend tell

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -