简体   繁体   English

如何确定以字符为单位的可见缓冲区宽度

[英]How to determine the visible buffer width in characters

I'm using a custom modeline and I'm starting to get how to configure it but here I'm stuck as to how to get the info I want: I'd like to show, in each buffer's modeline, the width in characters of the buffer. 我使用的是自定义Modeline,现在开始了解如何配置它,但是在这里我被困在如何获取所需信息方面:我想在每个缓冲区的Modeline中显示字符宽度缓冲区的。

I'm also using linum-mode (with always at least two columns used) and ideally I'd like to deduce the number of characters used by linum from the width. 我还使用了linum-mode(总是至少使用两列),理想情况下,我想从宽度推断出linum使用的字符数。

函数(window-width)是您要查找的功能,其中不包含linum-mode使用的字符,但是您可以从(window-margins)获取其宽度

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM