粘贴到电子邮件时突出显示语法 [英] Syntax highlighting when pasting into emails

查看:373
本文介绍了粘贴到电子邮件时突出显示语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,我经常通过我的展望向同事和合作伙伴发送小的代码片段和xml代码片段。
有没有人有一个好主意或工具,我可以用来让我的贴图语法高亮,然后我将它们粘贴到一个电子邮件。



我在想中间粘贴到$ fancytool,然后我会有一些要复制的htmlified,所以我可以复制粘贴到撰写电子邮件窗口。



编辑 - 更多信息:



从VMWare虚拟机中的Windows粘贴,它可能是eclipse,xmlspy,logfiles和其他程序



更多信息:



我看过此链接如何从Vim执行。不幸的是,它很少从vim im复制代码,我的电子邮件机器没有任何vim。 vmware机器有gvim,但我希望能够轻松地粘贴到vim,保存到文件,打开internetexplorer然后复制/粘贴

解决方案

晚了,但我可以给出一个有用的答案。
你需要2件事情


  1. putty

  2. 访问某些Unix服务器)

在putty选项中,在窗口→



粘贴到RTF中的剪贴板以及纯文本

p>

使用putty登录服务器。
通过键入vim
启动vim将文本(例如XML)粘贴到vim中。
输入命令模式(通过按 ESC 输入vim),然后键入
:set syn = xml



语法高亮踢入
使用鼠标复制文本并将其粘贴到您的电子邮件中。


Im in the situation that I often send small codesnippets and xml-snippets to coworkers and partners via my outlook. Has anyone got a good idea or tool that I can use to have my pastes syntaxhighlighted before I paste them into an email.

I was thinking of an intermediate paste to "$fancytool" and then I would have something to copy that will htmlified so I can copy paste it into the "compose email" window.

Edit-More-info:

Im pasting from windows within a VMWare virtual Machine, it might be eclipse, xmlspy, logfiles and other programs

Even-more-info:

I've seen this link how to do it from Vim. Unfortunately it seldom from vim im copying Code, and my email machine hasnt got any vim. The vmware machines has gvim, but I was hoping for an easier way that pasting to vim, saving to file, opening in internetexplorer and then copy/paste

解决方案

Late but I can give an answer that works. You need 2 things

  1. putty
  2. access to some Unix server (With vim)

In putty options, Under window → selection , turn the check box on for

Paste in to clipboard in RTF as well as plain text.

Log on to the server using putty. start vim by typing vim Paste your text (for example XML ) in to vim. enter command mode (of vim by pressing ESC) and type :set syn=xml.

Syntax highlighting kicks in. Copy the text using mouse and paste it into your email.

这篇关于粘贴到电子邮件时突出显示语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆