zoukankan      html  css  js  c++  java
  • emacs 矩形操作

    emacs 矩形操作

    如果使用图形化(GUI)的eamcs,使用M-x cua-mode,很好用,但是如果不是图形化的emacs(emacs -nw)的话,矩形操作就不能使用cua-mode。

    非图形化的矩形操作插件:【phi-rectangle】

    安装方法:

    1,找到phi-rectangle,并安装

    M-x list-packages
    

    2,修改.emacs文件,加下面的

    (require 'phi-rectangle)
    

    使用方法:

    • M-x phi-rectangle-mode,打开mode
    • 矩形的删除,插入,复制的前提是需要选择矩形。

    选择矩形的函数:phi-rectangle-set-mark-command

    1,删除矩形

    • 打开矩形选择(函数:phi-rectangle-set-mark-command),选择要删除的矩形
    • 删除矩形(函数:phi-rectangle-kill-region),或者c-w

    2,把选择的矩形的内容用空白代替

    • 打开矩形选择(函数:phi-rectangle-set-mark-command)
    • c-x r c

    3,在指定的矩形前插入字符

    • 打开矩形选择(函数:phi-rectangle-set-mark-command),
    • c-x r t 要插入的字符

    4,复制矩形的内容

    • 打开矩形选择(函数:phi-rectangle-set-mark-command)
    • 复制(函数:kill-ring-save),或者M-w

    5,粘贴:phi-rectangle-yank,或者c-y

    安装了别的工具后,想查看这个工具如何使用,怎么办呢?

    使用:M-x finder-commentary
    比如想看cua-mode里的各种命令,输入cua-base就可以查看,如果不知道全名,敲TAB键

    c/c++ 学习互助QQ群:877684253

    本人微信:xiaoshitou5854

  • 相关阅读:
    mac c++编译出现segmentation fault :11错误
    ssh 连接缓慢解决方法
    237. Delete Node in a Linked List
    203. Remove Linked List Elements
    Inversion of Control Containers and the Dependency Injection pattern
    82. Remove Duplicates from Sorted List II
    83. Remove Duplicates from Sorted List
    SxsTrace
    使用CCleaner卸载chrome
    decimal and double ToString problem
  • 原文地址:https://www.cnblogs.com/xiaoshiwang/p/11435115.html
Copyright © 2011-2022 走看看