如何在Lisp In Box中更改emacs配置 [英] How to change emacs config in Lisp In A Box

查看:91
本文介绍了如何在Lisp In Box中更改emacs配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经是程序员十年了,但我相信这是我第一次在论坛上提出问题。我只是无法想象出来,找不到已经在线的答案。



我正在尝试打开CUA模式,以便emacs对于Windows用户(普通复印功能)。我正在运行Windows 7,并通过 Lisp In A Box 软件包安装emacs。我明白我需要在.emacs文件或init.el文件中添加一行。我不知道哪个,但是我找不到我的口袋安装安装目录。 emacs包安装也没有任何教程或帮助文件,所以它真的很难选择这个。



我被卡住了,任何帮助是非常感谢! / p>

解决方案

对于GNU / Emacs,您可以选择使用以下三个文件名中的任何一个作为启动配置文件:

  $ {HOME} /。emacs 
$ {HOME} /。emacs.el
$ { HOME} /。emacs.d / init.el

这可能是一个好主意,三个选项之一,然后坚持下去 - 第一个似乎是最广泛使用的选项之一。在任何情况下,$ {HOME}代表您的主目录 - 这可能与Lisp In A Box安装目录不同!



来自Unix传统Emacs将您的主目录缩写为〜(tilde),因此您可以输入以下内容来访问.emacs文件:

  Cx Cf〜/ .emacs [ENTER] 

(请注意,首都C是Emacs标准符号CTRL键和第二个键的组合,即这里您按CTRL-x CTRL-f代表find-file,然后会要求您在框架底部的一个文件名(又名微型缓冲区) 。)



如果这是您的第一个自定义设置,您将看到一个空的缓冲区。输入

  ;;每次Emacs启动CUA模式
(cua-mode t)

并保存缓冲区使用Cx Cs。



下次启动Emacs时,CUA模式应该自动打开。


I have been a programmer for a decade now, but I believe this is the first time I've ever asked a question on a forum. I just can't figure this out and can't find the answer already online.

I am trying to turn on CUA mode so that emacs is more bearable for a windows user (normal copy paste functions). I am running Windows 7 and installed emacs through the Lisp In A Box package. I understand that I need to add a line to my .emacs file or init.el file. I'm not sure which, but I can't find either in my Lip In A Box install directory. The emacs package install also did not come with any tutorials or help files, so its really hard to pick this up.

I am stuck, any help is greatly appreciated!

解决方案

For GNU/Emacs, you can choose to use any one of the following three file names as the start-up configuration file:

${HOME}/.emacs
${HOME}/.emacs.el
${HOME}/.emacs.d/init.el

It would probably be a good idea to decide on one of the three options and then stick to it - the first one seems to be the most widely used one. In any case, ${HOME} stands for your home directory -- which is likely to be different from the Lisp In A Box install directory!

Coming from a Unix tradition, Emacs understands ~ (tilde) as an abbreviation for your home directory, so you can visit the .emacs file by typing:

C-x C-f ~/.emacs [ENTER]

(Note that the capital C is Emacs standard notation for a combination of the CTRL key and a second key, i.e. here you press CTRL-x CTRL-f which stands for "find-file" and will then ask you for a file name in the bottom part of the Frame (aka mini-buffer).)

If these are your first customizations, you will just see an empty buffer. Enter

;; start CUA mode every time Emacs starts
(cua-mode t)

and save the buffer with C-x C-s.

Next time you start Emacs, CUA mode should be turned on automatically.

这篇关于如何在Lisp In Box中更改emacs配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆