V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
leohxj
V2EX  ›  Emacs

emacs能不能在80列设置一条分界符?

  •  
  •   leohxj · 2012-10-24 14:15:45 +08:00 · 4375 次点击
    这是一个创建于 4174 天前的主题,其中的信息可能已经有所发展或是发生改变。
    网上找了半天,看到一个highlight-80+.el的插件,怎奈hook不了。。。
    用sublime text 2,里面可以设置rules:[80],这样的方式显示一条分界符,很方便。
    各位emacser如何处理的?
    7 条回复    1970-01-01 08:00:00 +08:00
    zellux
        1
    zellux  
       2012-10-24 14:24:03 +08:00
    开 whitespace-mode 就好了,参考配置:

    (setq whitespace-line-column 80)
    (setq whitespace-style '(face empty tabs lines-tail trailing))
    leohxj
        2
    leohxj  
    OP
       2012-10-24 14:45:40 +08:00
    @zellux whitespace-mode开了啊,可我这还是没反应。
    你能截图给我看下吗。
    zellux
        3
    zellux  
       2012-10-24 15:07:12 +08:00
    whitespace 的效果是超了 80 个字符高亮超出的部分,而不是显示一条分界符

    http://d.pr/i/afXm
    leohxj
        4
    leohxj  
    OP
       2012-10-24 15:12:13 +08:00
    @zellux 会不会和我配色冲突了?设置了,超过80的部分颜色还是没变。
    zellux
        5
    zellux  
       2012-10-24 15:14:50 +08:00
    你把光标移动到行尾(超过 80 的 部分),然后 M-x describe-face,看看是不是 whitespace-line。
    leohxj
        6
    leohxj  
    OP
       2012-10-24 16:06:11 +08:00
    @zellux 恩,调试好了。谢谢你。
    能问下如何按一次backspace删除tab扩展的4个空格吗?
    hjking
        7
    hjking  
       2014-02-13 13:52:47 +08:00
    试试column-marker.el
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2724 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 12:38 · PVG 20:38 · LAX 05:38 · JFK 08:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.