V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
leohxj
V2EX  ›  Emacs

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

  •  
  •   leohxj · Oct 24, 2012 · 5303 views
    This topic created in 4933 days ago, the information mentioned may be changed or developed.
    网上找了半天,看到一个highlight-80+.el的插件,怎奈hook不了。。。
    用sublime text 2,里面可以设置rules:[80],这样的方式显示一条分界符,很方便。
    各位emacser如何处理的?
    7 replies    1970-01-01 08:00:00 +08:00
    zellux
        1
    zellux  
       Oct 24, 2012
    开 whitespace-mode 就好了,参考配置:

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

    http://d.pr/i/afXm
    leohxj
        4
    leohxj  
    OP
       Oct 24, 2012
    @zellux 会不会和我配色冲突了?设置了,超过80的部分颜色还是没变。
    zellux
        5
    zellux  
       Oct 24, 2012
    你把光标移动到行尾(超过 80 的 部分),然后 M-x describe-face,看看是不是 whitespace-line。
    leohxj
        6
    leohxj  
    OP
       Oct 24, 2012
    @zellux 恩,调试好了。谢谢你。
    能问下如何按一次backspace删除tab扩展的4个空格吗?
    hjking
        7
    hjking  
       Feb 13, 2014
    试试column-marker.el
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5633 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 08:36 · PVG 16:36 · LAX 01:36 · JFK 04:36
    ♥ Do have faith in what you're doing.