骁斌's profile海豚湾的土狼PhotosBlogListsMore Tools Help

Blog


    27 September

    emacs命令

    C-x C-f (file name)  打开文件
    C-x C-v (file name)  用新的文件名替换但前文件名
    C-x C-s 保存编辑缓存
    C-x C-w (file name) 写入到文件中去
    C-x C-c  保存编辑缓存,退出
    C-a 光标移动到行首
    C-e 光标移动至行末
    M-a 光标移动至句首
    M-e 光标移动至句末
    C-f 向前一个字符
    C-b 向后一个字符
    M-} 前一段
    M-{ 后一段
    C-p 向前一行
    C-v 向前翻页
    M-v 向后翻页
    C-x ] 前一页
    C-x [ 后一页
    C-left C-right 向前向后移动一个词
    M-g [number] 跳至指定行
    C-l 重新定位到窗口正中
    在块开头C-spacebar,在块结尾M-w复制,C-w剪切
    C_ 或者 C-x u   Undo
    GNU Emacs不支持Redo,需要安装lib,并在.emacs配置文件中添加
    C-_ or C-x u  undo
    使用redo功能,需要修改配置文件.emacs
    (require 'redo) (global-set-key [(shift F5)] 'redo)
     
    自动备份需要在.emacs中配置,不设置自动备份 (setq make-backup-files nil)
    自动备份(单一文件) (setq make-backup-files t) (setq version-control 'never)
    自动备份(自动增加版本号) (setq make-backup-files t) (setq version-control t)
    版本号控制 始终保存的 (setq kept-old-versions 1)
     保存最新的,其余删除 (setq kept-new-versions 5)
    统一的备份目录 (require 'backup-dir)
    (setq bkup-backup-directory-info '((t "/home/blackie/.backups" ok-create full-path)))
    从自动存盘文件中恢复
    M-x recover-file/recover-session
     
    Buffer管理
    C-x b 切换到buffer,名字默认为文件名
    C-x k 关闭buffer
    C-x C-b 列出所有的buffer,进入Buffer管理
       进入buffer管理后,1 当前选中的buffer是指定frame唯一可见的buffer
       o 或 C-o 在另一个窗口中选中指定的buffer,o把光标移动过去
       d 标记buffer删除,并下移一行
       C-d 标记buffer删除,并上移一行
       s 标记buffer为保存
       x 执行标记的动作
    要保存buffer列表需要desktop lib,在.emacs中加入
    (load "desktop") 
    (desktop-load-default) 
    (desktop-read) 
     安装yic-buffer.el (load-library "yic-buffer")
    前一个buffer C-x C-p 后一个buffer C-x C-n 或者绑定
    (global-set-key [(control prior)] 'bury-buffer)
    (global-set-key [(control next)] 'yic-next-buffer)
     iswitchb库可用来加快buffer的索引
     
    搜索 
    1. 步进搜索 
      C-s 正向搜索 C-r 逆向搜索 C-w 用当前搜索到的单词补全搜索,再C-s就可以搜索下一个这个单词
       enter 退出搜索
        M-p 在搜索记录中回退 M-n 在搜索记录中前进
        M-y 不清楚
        (setq search-highlight t) (setq query-replace-highlight t)
      C-S-s C-S-r 搜索词
      (setq search-whitespace-regexp "[ \r\n\t]+") M-C-s M-C-r 正则搜索
    2.替代
      M-% String1(enter) String2(enter)  
    	y  替代,继续下一个
    	n  跳过,继续下一个
    	q  退出
        	!  直接替代所有
    	,  替代,退出
    	C-g 退出
    	^  回到上一个替代处
    	C-l 将当前匹配的行置中
    3.列出所有匹配的行 M-x occur string
    4.多文件搜索 
    	1.使用TAG
    5.书签管理
     
    和Shell 交互
    	M-x shell
     
    编辑风格 M-x c-mode/c++-mode/java-mode

    Comments (4)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    2 Nov.
    No namewrote:
    Key words click link to see (wow power leveling) and (wow gold) the discounted prices!
    17 Sept.
    No namewrote:

    Hi,Do you need advertisement screens, LCD digital signage and LCD signages? Please go Here:www.amberdigital.com.hk(Amberdigital).we have explored and developed the international market with professionalism. We have built a widespread marketing network, and set up a capable management team dedicated to provide beyond-expectation services to our customers.

    amberdigital Contact Us

    E-mail:sstar@netvigator.com
    website:www.amberdigital.com.hk
    alibaba:amberdigital.en.alibaba.com[dbc

    29 Aug.
    旦 俞wrote:
    这些我都看不懂,天书!!
    22 Apr.

    Trackbacks

    The trackback URL for this entry is:
    http://viatvon.spaces.live.com/blog/cns!64B34D06F657977D!271.trak
    Weblogs that reference this entry
    • None