Wednesday

How to blog source code from gVim

you have to :
1.add
let html_use_css = 1
to your _vimrc

2.add these style (depends on your current color scheme) to blog template


<style type="text/css">
<!--
.Statement { color: #a0ffa0; }
.Comment { color: #507080; }
.StorageClass { color: #a0a0ff; background-color: #103040; }
.Type { color: #a0a0ff; }
.Conditional { color: #a0ffa0; background-color: #103040; }
.Constant { color: #00cdcd; background-color: #103040; }
.pre { font-family: monospace; color: #e0eee0; background-color: #103040; }
.code { font-family: monospace; color: #e0eee0; background-color: #103040; }
-->
</style>



3.Use :TOhtml command for create html file from selected part of source code.
4.Install script from here and Use \blog command calling python script to post file on your blog.

2 comments:

Unknown said...

How are titles picked up? From the first line of the current VIM editor content?

From a pass through the code, I see a line like entry.title = atom.Title(title_type='xhtml', text=fileHandle.readline() )

badbot said...

Hi, title is first line of your post.

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...