首页 > 初级, 学习Emacs > Emacs - 普通人的编辑利器

Emacs - 普通人的编辑利器

2010年11月24日 ahei 发表评论 阅读评论

作者: yibie

现代生活中,文档越来越重要,电脑已经成为编辑文本最主要的工具,程序员的工作其实就是编辑文档,选择高效的文本工具,自然要考虑程序员用的工具。而 Emacs 就是一个是适合普通人使用的高效文档编写工具。

谈及 Emacs,很多人第一个感觉就是很复杂,随之而来就有一个疑问“很难用的吧?”。但是,我虽然不是程序员,现在使用 Emcas + Org-mode(Emcas 上的插件) 的组合,感觉行云流水,毫无碍难。心中想到,为什么就算是程序员也觉得 Emcas 难用,而我作为一介 非程序员 却觉得 Emacs 好用呢?我觉得,这不过是以讹传讹罢了。

为什么不是程序员的你也能运用 Emacs?

说实在话,就一个普通人而言,在没有接触过 Emacs 之前,是没法想像原来文本可以玩出这么多花样(Vim也很强,不过本文只谈 Emacs)。但是在网上,却有很多人在说 Emacs 难用,不得不说这是对 Emacs 的妖魔化。文本编辑器多种多样,Emacs 作为一个发展的40多年的编辑器,如果它真的要这么差的话,它早就应该成为历史的淘汰者,再不被人提起。而事实正正相反,Emacs 不但流传广泛,而且还被誉为世界两大编辑器之一,被人称之为“神的编辑器”。所以,以下的文字算是为 Emacs 辩解,要注意的是本文 并没有贬低别的编辑器 的意思。

不要妖魔化 Emacs !

  • 妖魔化 Emacs 之①:Emacs 的操作效率不高。
    • 大多数这么说的人,都是使用 Vim 的程序员。也就是说,他们的这种评语,是从他们的职业特性出发,他们的判断并没有从其他的职业来出发考虑。事实上,就算 Emacs 的操作效率再怎么差,比起 Windows 下的记事本/Word 来说,那全键盘的操作下效率还是要高多了。
  • 妖魔化 Emacs 之②:Emcas 的操作复杂,不易学习。
    • Emacs 没有“颠覆”人们的操作习惯,仅仅是增加了一些快捷键,使 Emacs 做到全键盘操作。对比起 Vim 来说,Emacs 的输入无需转换“模式”,上下左右还是上下左右,没有 变化,不会让人在理解上发生困难。
  • 妖魔化 Emacs 之③:Emcas 的配置复杂。
    • 有很多人上网查看 Emacs 的配置文件,会被长长的配置文件吓倒。但是,不要忘了,写这些配置的人,都是一些程序员,他们对文本编辑器,由于他们要编写的文件,需要一些提示,免得他们在编写的过程中犯错,所以在给配置的时候,就会加入一些自已的要求。而经过我的实验,像我这样的普通人,如果没有特别的需求,Emacs 基本不用配置,而且就算要配置,只要通过 Emcas 的功能菜单就能配置好。所以,实际上并不复杂。

总结

  • Emacs 没有“模式”之分,内容即敲即输符合人性直觉;
  • 有可视化的配置选项,没有特别要求无须修改配置文件。

为什么你应该用 Emacs?

轻松进入“无念编辑”境界,编辑文档高效随心

  • “无念”是什么意思?
    • 对于佛经来说:”无念”就是,”于念而无念”,”于诸境上,心不杂”,即在一切境上、心不被外境所染,在自己的心念上。常能远离一切外境,不在所遇境上起妄念。但不是百物不思,不是无思维存在,不是心中一片死寂,而是”心不染境”,在念念之中排除一切杂念妄想、排除”尘劳邪见”。
    • 简单来说:“无念”是一种极度专心的状态,而人处于这种状态的时候可以最大限度的爆发出自身的潜能,自然而然的达到了自已目的。有的运动员在比赛中因极度的专心,会让人好似进入另外一个世界,而在这个世界中,他什么都感觉不到但又对一切变化都能了然于胸,什么也想不到但又对自已接下来要做的事十分笃定。最后,他就有如神助般,在不知不觉中打败对手。
    • 总而言之,“无念”就是一个人状态最好的时候。
  • 为什么用 Emacs 可以帮助你进入“无念”境界?
    • 因为用 Emacs 来编写文档的时候,在编写文档的过程中 你不会考虑到除了文档内容之外的问题,你所要做的就是把眼前的文档编写完毕。你不会像使用 Word 那样要不停考虑排版问题。在编写文档的过程中,一会加粗一下这个字,一会搞搞标题,这样分心反而无法让你好好地完成眼前的工作。

使用文本记录一切,最绿色便携、兼容性最最强的方案

  • “文本”是所有系统里面都可以使用的格式,在任何系统下你都可以读取/修改它
  • “文本”什么编辑器都可以读取/修改,不需要重新安装软件,不会向系统里面添加更多东西
  • “文本”的体积最小,里面只记录内容,没有多余的东西

Org-Mode,令 Emacs 变成“文本魔法师”

如果 Emacs 没有 Org-Mode 这个插件,我绝对不会推荐 Emcas 给大家使用。但是,由于有了 Org-Mode, Emacs 处理文本的能力得到了大幅度的提高,也使我可以从容的向大家推荐使用 Emacs 来编写文档。

“设置标题”可以让你在编写文档的时候更显轻松

  • 有的人用 Word,会很怀念里面的大纲视图,因为在大纲视图里面可以很方便的浏览文档里面的每个小节,可以从总体上把握文档的内容。而在程序员的世界里面,他们同样有这样的需求,因为他们的工作也要写大量的内容。不过,他们是如何检阅自己写的内容的呢?答案是,他们会把自己写的内容分成很多个段落,然后他们会用到一个叫 代码折叠 的功能,把不需要编辑段落收起来,等要编辑的再把这个段落展开。这样就可以变相的有了“大纲视图”的功能。
  • 在 Org-Mode 设置标题,需要标记一些文本,而做标记很简单,在标题的前面加星号就可以了。
  • 具体是这样:
    * 这是标题一
    ** 这是标题二
    *** 这是标题三
    注:最多可以支持10层标题
  • 究竟妙不可言之处在哪,可以看看这个介绍视频(以后有机会,我会自己亲自录制一个视频):http://orgmode.org/worg/org-tutorials/org-screencasts/org-series-episode-1.php

运用“标记语法”,不用鼠标也能丰富文本效果

  • 有人会疑问,不用鼠标该如何让文字变粗、倾斜、加下划线呢?很简单,只要按照下面的示例来做:
    标记语法 效果
    *加粗* 加粗
    /倾斜/ 倾斜
    _下划线_ 下划线

运用“结构化文本”多格式输出,不再为文档转换而烦恼

  • Org-Mode 支持多种文档的输出,所以只要会用 Org-Mode,就可以随心的把的文档转化成自己想要的格式。这等于“一份文档,多种拷贝”,省心省时省力。
  • Org-Mode 支持转化的格式有:
    • 文本
    • 网页
    • PDF(需要 Latex 支持)
    • XOXO
    • Freemind
    • Docbook
    • iCalendar(苹果 iCal 文件)
    • ……

各种资料

Emacs 的快速教程

Org-Mode 的快速教程

各大中文 Emacs 网站

更新记录

  • 10月3日初稿,更正水木社区 Emacs 版块的链接(感谢 xbeta);更正 Emacs 是编辑器之神的错误,感谢水木社区的网友 anhnmncb
分享家:Addthis中国
GD Star Rating
loading...
Emacs - 普通人的编辑利器, 7.9 out of 10 based on 53 ratings 标签:Emacs, emacser, emacser.com, IDE, org, Org Mode, screenshot, ubuntu, windows, 代码折叠, 插件, 配色, 鼠标

相关日志

分类: 初级, 学习Emacs
  1. 2016年4月7日11:44 | #1

    This article is a home run, pure and simple!

    [回复]

  2. 2016年4月7日11:47 | #2

    That’s really thinking out of the box. Thanks!

    [回复]

  3. 2016年4月7日12:27 | #3

    Hey, subtle must be your middle name. Great post!

    [回复]

  4. 2016年4月7日12:47 | #4

    Keep it coming, writers, this is good stuff.

    [回复]

  5. 2016年4月7日19:18 | #5

    That’s more than sensible! That’s a great post!

    [回复]

  6. 2016年4月7日19:30 | #6

    An intelligent answer – no BS – which makes a pleasant change

    [回复]

  7. 2016年4月7日19:46 | #7

    Real brain power on display. Thanks for that answer!

    [回复]

  8. 2016年4月7日20:06 | #8

    WASHINGTON (AP) — Braden Holtby stopped 28 shots, Alex Ovechkin scored his seventh goal and the Washington Capitals handed the Boston Bruins their first road loss of the season, 4-1 on Thursday night. [url=http://o.storeonlinecc.com]oakley glasses[/url] In this Jan. c [url=http://www.michaelkorshandbagsbuy.us.com]michael kors outlet[/url]
    AUSTIN, Texas, Jan. [url=http://www.louisvuitton-outlet.us.org]louis vuitton handbags[/url] “That’s a no fly zone.
    Alario trained throughout the spring semester and the summer with some of her Tulane teammates and Tulane women’s soccer coach Betsy Anderson before heading to Las Vegas with her mother. [url=http://www.michaelkorsoutletbuy.us.com]michael kors outlet online[/url] Why don t you like this ad ?It s offensive to meI keep seeing thisIt s not relevant to meSomething elseDoneJapan s Yomiuri Giants rocked by gambling scandalBig League StewTrendingJustin Bieber ‘Slapped’ And Told To Shut His ‘B**** A** Up’ By UFC Champion Nate DiazMichael AllenThis Site is SO Addicting!Thank you for your feedbackWe ll review and make changes needed. s [url=http://www.coachoutletstoreonline.me]http://www.coachoutletstoreonline.me[/url]
    Donte Moncrief, IND, vs. [url=http://www.michaelkors.us.org]www.michaelkors.us.org[/url] Does anybody else sense that this is San Benito politics at its worse? This is the Chamber of Commerce promoting a liberal candidate over the Republican, Casey Lucius.
    q Saginaw Arthur Hill built a double-digit lead in the first quarter and never looked back in Wednesday’s 70-49 district semifinal victory over Clio. [url=http://www.coachoutletsonlines.us.org]coach factory outlet[/url] Jonesboro campus projects will focus on food technology, lab work and business incubation, while the industrial park center, in a partnership with ASUNewport, will focus on manufacturing. [url=http://www.coachoutletstoreonline.me]coach outlet store online[/url]
    This is her way of trying to shift all the blame to Artur. [url=http://www.louisvuittonhandbagsrack.us.com]louis vuitton handbags[/url] 1 defense. http://www.coachoutletsonlines.us.org
    Georgia, Nebraska target Nehemiah Augustus having a ‘great’ season; will wait until signing day to announce decision [url=http://www.coachhandbagsdeal.us.com]coach handbags[/url] After a full day of deliberations, the panel said the stalker was responsible for 51 percent of the blame and the two hotel companies would share the rest, which comes out to nearly $27 million. b [url=http://www.michaelkorshandbagstrade.us.com]michael kors outlet online[/url]
    The Mayanmeans “strength” and it’sno wonder since these crunchy seeds deliver high levels of nutrients you need like fiber, protein, omega fatty acids, calcium and antioxidants [url=http://www.raybansunglassesebay.us.com]ray ban glasses[/url] “As a port of entry inspector, Acosta served at the front line of America’s effort to keep illicit drugs from flowing into our country.
    RUSHING (carries-yards): PINEWOOD—Murphy 14-169, Banning 1-62, Dagman 6-6, Bailey 6-20. [url=http://www.michaelkorshandbagsoutletup.us.com]michael kors outlet[/url] Animated.
    The year 2016 should be one to help and care for our community. [url=http://www.coachoutletsonlines.us.org]coach outlet online[/url] The field didn’t have to worry about five-time Watkins Glen winner Tony Stewart.
    Sending out a call to all Danish villages to provide their quota of ships, the Danish naval fleet set sail eastwards on a mission to secure a presence in the region by invading Estonia. [url=http://www.coachoutletonlinebuy.us.com]coach factory outlet[/url] During the 2015 holiday season, Poteete attended two events sponsored by CARTI — the Sugar Plum Ball at the CARTI Festival of Trees and the CARTI Kids Christmas Party.
    h Drivers may see shifting traffic patterns or single-lane traffic restrictions with flaggers on weekdays from 8:30a. [url=http://www.michaelkorsbags.me]michael kors bags[/url] Runner-up: Dayspring United Methodist Church in Tempe: To receive second runner-up accolades, the church participated in two SRP rebate programs and installed new programmable thermostats as well as energy-efficient lighting to the interior and exterior of the church campus.
    Robinson Cano, Sea – You can find . [url=http://www.raybansunglasses.name]www.raybansunglasses.name[/url] “Often we don’t have enough volunteer homes to house the number of dogs that we take into rescue. p [url=http://www.raybansunglasses.name]ray ban sunglasses[/url]
    NEW YORK, March 9, 2016 PRNewswire — Algeria s growing population and ongoing urbanisation continue to be the engine of home care within the country. [url=http://www.michaelkorshandbagsoutletbuy.us.com]michael kors outlet[/url] He also conquers the ball, fights, everything he does is first class.
    n For the third straight season faced off against crosstown-rival in district play. [url=http://www.michaelkorshandbagsrack.us.com]michael kors online[/url] “We’ve finished our version of the iPhone 1,” Bond said. p
    Known as , this 50,000-square-foot waterpark features three large slides for adults, along with two smaller ones for young kids. [url=http://www.michaelkorsoutletbuy.us.com]michael kors outlet online[/url] Misdemeanor charges were brought against another person involved in the capture but ultimately were dismissed as part of an agreement with the U. [url=http://www.michaelkors.us.org]michael kors outlet online[/url]
    Yvette M. Ingraham to Christopher J. Harper, 324 Russell Road, Unit 110, $120,000. [url=http://www.coachoutlet.cc]coach factory outlet[/url] According to court files, her husband told police that he and Arriaga had gotten into an argument at their home because she had been drinking and wanted to go to the liquor store. u [url=http://www.coachoutletstores.net.co]coach outlet[/url]
    Agents conducted a secondary inspection and found several packages of the drug hidden in the vehicle. [url=http://www.michaelkorsbags.me]michael kors outlet online[/url] “Redevelopment is a major driver for the Tucson retail market right now,” McClure said.
    First quarter:Marcus Mariota got the Titans on the board when he found Craig Stevens on a 20-yard touchdown pass. A botched extra point attempt left the Titans with only six points after their score. The Oakland Raiders responded when Derek Carr found Michael Crabtree on a seven-yard touchdown pass. [url=http://www.coachhandbags.com.co]coach outlet online[/url] Based on the level of bone growth and regeneration, Romo could opt to have doctors shave or remove part of the clavicle where it meets the shoulder. o [url=http://www.coachstoresonline.com]coach outlet store online[/url]
    Danny Trevathan: Fresh off a Super Bowl win, Trevathan hits the free agent market and is likely to attract plenty of suitors. [url=http://www.michaelkorshandbags.us.org]michael kors outlet online[/url] 990 fielding percentage behind the plate and had his season conclude with a call-up to the Los Angeles Angels.

    [回复]

  9. 2016年5月21日23:01 | #9

    sandro, che il gestore fosse finito in un tribunale è una supposizione, ma che il gestore guardasse ai suoi introiti è sicurissimmo.Sono d’accordo con un commento che ho letto più sopra.Siamo noi che diamo tutto questo potere alle donne.Se ci sono due pompe di rifornimento attaccate l’una allaltra tutti noi andiamo da quella con la ragazza di bella presenza, perchè negarlo?

    [回复]

  10. 2016年9月21日00:58 | #10

    But the soldiers hide after the ceremony gave birth to some trouble. White check Dijun Rende, originally intended to let the grief of his granddaughter to rest two or three years then take her to the mortal world, didn’t expect little granddaughter rest but a couple of days, myself well burden of skin came to say good-bye. See this little granddaughter on the road and motivated, nature is the quasi white check dijun. Leaving forwarding her an envelope and the letter A, matched with another in her aunt’s white light of God said, she alone outside, if there is something the matter shall be with the family to discuss, took the pen to write on letterhead, her aunt in her letters in the self energy.

    [回复]

评论分页
1 ... 5 6 7 41723
  1. 2010年11月24日17:37 | #1
  2. 2010年11月28日16:46 | #2
  3. 2010年12月26日22:45 | #3
  4. 2011年1月4日18:39 | #4
  5. 2011年11月6日17:07 | #5
  6. 2012年2月24日03:32 | #6
  7. 2014年3月4日21:01 | #7
:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!: