打印最多第 100 列
我写东西的方式看起来像这样 - 我在 Vim 中设置了一个 colorcolumn
为 100。将打印并进入手册的实际内容进入文本那是在第 100 栏之前,我的笔记、评论……不应该看到的东西,或者与当前版本无关的东西在第 100 栏之后。
这是一个非常简单而有效的系统。
所以,这是我的问题...如何打印(转换为 PDF)第 100 列之前的所有内容,而忽略其后的任何内容?
我正在考虑一个系统:移动所有内容到一个临时文件中,删除第 100 列之后的所有内容,打印剩余的内容 ...但是有没有一种方法可以使它非常快,比如将其放入一个命令/函数中,所以我不'不必经历五个不同的步骤 道路?
欢迎所有建设性想法......
My way of writing stuff looks something like this - I have a colorcolumn
in Vim set on 100. The actual stuff that will get printed and go in the manual goes into the text that is before the 100th column, and my notes, comments, ... stuff that should not be seen, or that isn't relevant to the current version goes afterwards the 100th column.
It is an amazingly simple and effective system.
So, here's my question ... how can I print (into PDF) everything up to 100th column, disregarding anything after it?
I was thinking of a system: move everything into a temporary file, delete everything after the 100th column, print the remaining stuff ... but is there a way to make this really quick, like put it into one command/function, so I don't have to step through five different steps along the way?
All constructive ideas welcomed ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您有 pdf 打印机(例如安装了
cups-pdf
),您可以执行以下操作::set pdev=pdf
ENTER:设置 printoptions=paper:A4,syntax:y,wrap:y
ENTER:%s:^\(.\{100\}\).*:\1:
回车:硬拷贝
回车< /kbd>我将由您来创建一个函数/命令。
Well if you have a pdf printer (e.g.
cups-pdf
installed you can do something like::set pdev=pdf
ENTER:set printoptions=paper:A4,syntax:y,wrap:y
ENTER:%s:^\(.\{100\}\).*:\1:
ENTER:hardcopy
ENTERI'm leaving it to you to create a function/command from it.
你的意思是
vim
吗?Do you mean
vim
?