LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: 倩儿

emacs的方便(大家补充下去,好吗)

[复制链接]
发表于 2004-3-27 12:32:22 | 显示全部楼层
最初由 黄叶 发表
emcas在图形界面没有出来之前是唯一能够多窗口运行的程序。
代码自动着色,
代码格式自排版。
书签功能,快速定位,快速的编辑。
可以启动shell。

我常用的快捷键:

C-x C-f :打开/新建文件
C-x S :保存所有缓冲区文件
C-x C-v:在当前缓冲区打开文件
C-x  k   :关闭当前缓冲区
C-x   i   : 在当前光标位置插入文件
M-x replace-string: 一次性替换字符串
M-x % : 循环替换。
C-s
C-r :查询

C-@ :设置标记,然后选取
C-w   :相当于剪切。
M-w    :相当于复制
C-y      :粘贴
M-y  : 循环粘贴。

C-o:开新行

C-f, C-b, C-p, C-n, M-f, M-b, C-v , M-v , C-l, M->, M-<移动。

C - !, 一次性执行shell, M-x shell, 启动shell外壳。
M-x compile:编译程序。


先写这么多了。


有些vi也能多窗口
发表于 2004-3-27 12:34:44 | 显示全部楼层
没错,很多vi变种如vim就可以。
发表于 2004-3-27 23:40:22 | 显示全部楼层
emacs + etags(TAGS)还不错阿,兄弟,哈哈
当然的确没有source insight方便:)
不过加TAGS加grep什么的,结合起来用,基本上差不多了。
发表于 2004-3-28 00:48:18 | 显示全部楼层
最初由 arfankai 发表
emacs + etags(TAGS)还不错阿,兄弟,哈哈
当然的确没有source insight方便:)
不过加TAGS加grep什么的,结合起来用,基本上差不多了。


我估计用etags之类的局限还是很大的。
我下午研究了一下
http://ecb.sourceforge.net/

http://cedet.sourceforge.net/ede.shtml

我觉得他们在emacs上的应用,大概可以达到类似source insight的效果,大家可以看看,总结总结怎么用最好。
发表于 2004-3-29 15:46:33 | 显示全部楼层
这是我的Emacs的中文显示
不知道是否符合大家的要求?

基本上可以对中文进行正常的处理和输入

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2004-3-29 15:49:49 | 显示全部楼层
最初由 handi 发表
这是我的Emacs的中文显示
不知道是否符合大家的要求?

基本上可以对中文进行正常的处理和输入

兄弟安装了mule-gbk吗?可否把你的.emacs贴出来大家看看。
发表于 2004-3-29 17:28:57 | 显示全部楼层
惭愧,只是按照坛子里一篇文章做了一次汉化就有这样的效果了,真正的原理还要研究一把, 按照同事的实验,应该是字体的原因.
发表于 2004-3-29 17:31:32 | 显示全部楼层
;; Red Hat Linux default .emacs initialization file

;; Are we running XEmacs or Emacs?
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))

;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)

;; Turn on font-lock mode for Emacs
(cond ((not running-xemacs)
       (global-font-lock-mode t)
))

;; Visual feedback on selections
(setq-default transient-mark-mode t)

;; Always end a file with a newline
(setq require-final-newline t)

;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)

;; Enable wheelmouse support by default
(cond (window-system
       (mwheel-install)
))

;; show column number
;; 显示列号
(setq column-number-mode t)

;; no backup file
;; 不生成临时文件
(setq-default make-backup-files nil)

;; replace yes/no with y/n
;; 用y/n代替yes/no
(fset 'yes-or-no-p 'y-or-n-p)

;; disable pc bell
;; 关闭PC铃声
(setq visible-bell t)

;; kill the line wihle hit C-k
;; 在行首击C-k时同时删除该行
(setq-default kill-whole-line t)

;; no startup screen
;; 关闭启动画面
(setq inhibit-startup-message t)

;; show emacs@file at emacs title
;; 在标题栏显示 emacs@file
(setq frame-title-format "emacs@%b")

;; set default tab width
;; 设置tab宽度为4
;; (setq default-tab-width 4)
(setq tab-width 4
          ;; space change to tab
          indent-tabs-mode nil)

;; show another parentheses but jump to it.
;; 类似Urlt Edit的作法,只显示开始和结束符,而不把光标跳到该处
(show-paren-mode t)
(setq show-paren-style 'parentheses)

;; while cursor close to mouse, let mouse away
;; 当光标移动到鼠标所在位置,让鼠标自动滑开
(mouse-avoidance-mode 'animate)

;; set font message
;; 设置字体,窗口,位置和大小
;; if the window size and position is not correct as
;; the configure file, please check .Xresources file
;; in your home directory.

(setq default-frame-alist
      '(
        (top . 10)
        (left . 20)
        (height . 50)
        (width . 80)
        (cursor-type . bar)
        (cursor-color . "white")
        (font . "lucidasanstypewriter-12")
        (background-color . "black")
))

(frame-parameter nil 'font)

;; close menubar and tool
;; 关闭菜单栏和工具栏
(menu-bar-mode nil)
(tool-bar-mode nil)

;; set time-stamp
;; 记录修改时间
;; (add-hook 'write-file-hooks 'time-stamp)
;; (setq time-stamp-format "%:u %02m/%02d/%04y %02H:%02M:%02S")

;; set hot-key
;; 设置热键

;; M-g 跳到行:
(global-set-key "\M-g" 'goto-line)

;; M-o 显示当前缓冲区中关键词列表
;; list all the lines of the current buffer matching a regrep
(global-set-key "\M-o" 'occur)

;; M-q 在当前目录中全局查找关键词
;; reference or search in files.
(global-set-key "\M-q" 'grep-find)
发表于 2004-3-29 17:36:22 | 显示全部楼层
具体是参照这篇文章做的
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=30742

原因应该是由Redfonts字体产生的效果
偶基本没有做什么事情, 只要可以用就行了.
发表于 2004-3-29 20:22:41 | 显示全部楼层
不知道是不是这样的效果,只需要2句话就可以了
(create-fontset-from-fontset-spec
"-*-fixed-medium-r-*-*-16-*-*-*-c-*-fontset-chinese,
chinese-gb2312:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gb2312.1980-*")
(set-default-font "fontset-chinese")

就是有点搞不懂这个fontset-chinese放在这里是什么意思,本来这里是编码的地方,我这是参考lfs的emacs中文化里面的东西。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表