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

📄 00000003.htm

📁 一份很好的linux入门资料
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<HTML><HEAD>  <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>&nbsp;<BR>文字的勘误&nbsp;<BR>&nbsp;<BR>EMACS&nbsp;所提供的这项功能,并不是内建於&nbsp;EMACS&nbsp;的。&nbsp;<BR>EMACS&nbsp;只是提供使用&nbsp;UNIX&nbsp;拼字工具的介面,使用者可以借由此一介面,&nbsp;<BR>使用&nbsp;UNIX&nbsp;的拼字工具。&nbsp;UNIX&nbsp;环境,较常使用的拼字检查工具程式&nbsp;<BR>(spelling&nbsp;checker&nbsp;program)有&nbsp;spell&nbsp;与&nbsp;&nbsp;ispell。二者又以&nbsp;<BR>&nbsp;ispell&nbsp;较为方便好用。虽然如此,并不是所有的&nbsp;UNIX&nbsp;系统都&nbsp;<BR>提供有&nbsp;&nbsp;ispell&nbsp;与&nbsp;&nbsp;spell&nbsp;等工具程式。使用者可以&nbsp;``&nbsp;which''、&nbsp;<BR>&nbsp;``&nbsp;find''&nbsp;等指令,在&nbsp;shell&nbsp;下查阅&nbsp;UNIX&nbsp;系统所提供的工具为何。&nbsp;<BR>不清楚如何使用&nbsp;&nbsp;which&nbsp;或&nbsp;&nbsp;find&nbsp;等指令的使用者,&nbsp;<BR>请查看&nbsp;man&nbsp;page&nbsp;。&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EMACS&nbsp;提供的拼字检查介面,是针对&nbsp;&nbsp;ispell&nbsp;的使用法&nbsp;<BR>为主。透过&nbsp;EMACS&nbsp;的介面,使用者可使用&nbsp;UNIX&nbsp;系统所安装的&nbsp;<BR>&nbsp;ispell。若系统没有安装&nbsp;&nbsp;ispell,可以&nbsp;ftp到适当的地方得取。&nbsp;<BR>(Ispell&nbsp;is&nbsp;available&nbsp;via&nbsp;anonymous&nbsp;ftp&nbsp;from&nbsp;ftp.cs.ucla.edu&nbsp;in&nbsp;the&nbsp;directory&nbsp;/pub/ispell.)&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ispell&nbsp;除了会自动侦察文件的拼字错误外,还提供可能&nbsp;<BR>修改的讯息,供使用者参考。&nbsp;ispell&nbsp;的除错□围,可以侦察&nbsp;<BR>一个字,也可以侦察一个区域或整个的缓冲区。&nbsp;<BR>&nbsp;<BR>使用&nbsp;&nbsp;ispell&nbsp;时,程式会根据所检查的内容做出适当的回应。&nbsp;<BR>如果检查无误,&nbsp;&nbsp;echo&nbsp;area&nbsp;会出现无误的讯息。如果所检查&nbsp;<BR>的字有误,&nbsp;&nbsp;ispell&nbsp;会另开一个视窗,将所有可能的勘误组合&nbsp;<BR>显示出来,以利使用者做评估。若在显示的视窗找到合适的取代文字,&nbsp;<BR>可直接键入文字的编号来完成勘误的程序。&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ispell&nbsp;使用了两种不同的字典,一种是由&nbsp;&nbsp;ispell&nbsp;<BR>所提供的标准字典(standard&nbsp;dictionary)。另一种是使用者自已&nbsp;<BR>建构的私有字典(private&nbsp;dictionary)。标准字典是系统所提供的;&nbsp;<BR>使用者字典是在编辑文件时,因需要而随时加入的。当标准字典无法&nbsp;<BR>找到的字,使用者可随时将新增的字加入私有字典中。系统所使用的&nbsp;<BR>标准字典,可依使用者的需要来指定。当然,若不指定标准字典,&nbsp;<BR>系统会使用预定的字典。若想改变预定的字典,可使用如下的指令来设定:&nbsp;<BR>&nbsp;<BR>ESC-x&nbsp;ispell-change-dictionary&nbsp;<BR>&nbsp;<BR>若想查阅所使用的标准字典为何,可查阅变数``ispell-dictionary''&nbsp;<BR>&nbsp;来得到相关讯息。如下是笔者以&nbsp;``&nbsp;Ctrl-h&nbsp;v''&nbsp;指令查阅此变数&nbsp;<BR>所得的结果。若已淡忘变数的查询,请参考&nbsp;4.4&nbsp;节。&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ispell-dictionary's&nbsp;value&nbsp;is&nbsp;nil&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Documentation:&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;non-nil,&nbsp;a&nbsp;dictionary&nbsp;to&nbsp;use&nbsp;instead&nbsp;of&nbsp;the&nbsp;default&nbsp;one.&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;passed&nbsp;to&nbsp;the&nbsp;ispell&nbsp;process&nbsp;using&nbsp;the&nbsp;&quot;-d&quot;&nbsp;switch&nbsp;and&nbsp;is&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;used&nbsp;as&nbsp;key&nbsp;in&nbsp;ispell-dictionary-alist&nbsp;(which&nbsp;see).&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You&nbsp;should&nbsp;set&nbsp;this&nbsp;variable&nbsp;before&nbsp;your&nbsp;first&nbsp;call&nbsp;to&nbsp;ispell&nbsp;(e.g.&nbsp;in&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;your&nbsp;.emacs),&nbsp;or&nbsp;use&nbsp;the&nbsp;M-x&nbsp;ispell-change-dictionary&nbsp;command&nbsp;to&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;change&nbsp;it,&nbsp;as&nbsp;changing&nbsp;this&nbsp;variable&nbsp;only&nbsp;takes&nbsp;effect&nbsp;in&nbsp;a&nbsp;newly&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;started&nbsp;ispell&nbsp;process.&nbsp;<BR>&nbsp;<BR>现在就讨论&nbsp;&nbsp;ispell&nbsp;的使用方法。&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;一般文件使用&nbsp;{&nbsp;ispell&nbsp;检查错误所使用的指令,&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可依所检查的□围分成如下三种:&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o&nbsp;&nbsp;检查「字」的&nbsp;&nbsp;ispell指令如下:&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ESC-\$&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o&nbsp;&nbsp;检查「区域」(region)的&nbsp;&nbsp;ispell&nbsp;指令如下:&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ESC-x&nbsp;ispell-region\index{ESC-x&nbsp;ispell-region&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;使用区域的检查以前,要先将区域的□围界定清础,再使用&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;此指令来做区域的检查。&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o&nbsp;&nbsp;检查「缓冲区」(buffer)的&nbsp;&nbsp;ispell&nbsp;指令如下:&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ESC-x&nbsp;ispell-buffer&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;检查整个缓冲区内的文字内容。&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;信件中使用&nbsp;&nbsp;ispell&nbsp;检查错误的指令&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ESC-x&nbsp;ispell-message&nbsp;<BR>&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;以&nbsp;&nbsp;ispell&nbsp;检查文字内容时,&nbsp;echo&nbsp;area&nbsp;会有回应&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;的讯息出现。若有错误发生时,会另开一个视窗,将所有的修改&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可能显示出来。如何使用&nbsp;&nbsp;ispell&nbsp;来修改错误,就是现在&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;的话题了。&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o&nbsp;&nbsp;若检查的□围只是一个字时,此时,所检查的字若正确无误,&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;area&nbsp;会出现&nbsp;<BR>

⌨️ 快捷键说明

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