Sublime Forum

ExportHtml Plugin (rename from PrintHtml)

#87

[quote=“quodlibet”]
I think you just made Instagram for coders.[/quote]

instacode?

I know, I hate myself a little for it :smile:.

0 Likes

#88

1 out of 5 *s

I need blur and vignette to make my code look pretty!1!!1!11!!!

(Also, torn edges would be nice)

0 Likes

#89

[quote=“C0D312”]1 out of 5 *s

I need blur and vignette to make my code look pretty!1!!1!11!!!

(Also, torn edges would be nice)[/quote]

Yes, I think I heard that code runs better if it is prettier.

0 Likes

#90

@facelessuser: you are now inscribed in my signature. classic.

0 Likes

#91

That’s funny :smile:.

0 Likes

#92

So, ever since I added background colors to scopes, I have been struggling with the getting the CSS right to support code wrapped in tables (so I can copy and paste into Outlook emails; and other emails), inline spans (they don’t seem to expand to fill the table unless they are inline-block; inline-blocks fix the gap issues, but they don’t wrap well), annotation underlines ( underlining the annotations with dotted underlines started to break when I added background colors; some weird overlaps etc.).

So I fixed the above issues finally, but the gaps in background color can return if you are using certain fonts. I removed the workaround (which really only helped 70% of the time, but also caused me other headaches). I now recommend if you are using a theme that has background colors to just hard code the font-face in the settings file to something reliable like Courier or Courier New (this font doesn’t cause gaps in background colors. It is also much more likely to be on another users computer if you share the html output.). I also changed the underline method for annotations; it now just uses text-decoration: underline; much more reliable when working with the spans and background colors and trying to keep the dotted border from getting overlapped with the odd dynamics that are going on with the spans.

Also added better tooltips for annotations that follow the mouse. I am hoping this is the last update for a bit. I have been getting tired of tweaking all of this stuff.

Its funny, if I just gave up in trying to wrap this stuff in tables, and gave up on the pretty wrapping (wrapping after the gutter), I could solve almost all of these issues quite easily, but the feature I use the most in this is copying to emails, so I need the table wrapping in order to handle themes with non-white backgrounds. So that clears it up. Everything should be more reliable now, but if you get gaps in background colors when using font X, try hard coding the settings file to always use a font like Courier (or something else that is equally reliable for monospace fonts).

Version 0.5.7

  • Better tooltips for annotations (they now follow the mouse)
  • Remove workaround to fix gaps in background color (it is recommended to just use a reliable font like Courier)
  • Change method of underlining annotations to work in wrap mode and non-wrap mode and with background colors
  • Fix for CSS in annotation table not handling comment overflow
0 Likes

#93

Could you add an air conditioner?

0 Likes

#94

I will have to figure out how to make it work with the air purification system first :smile:.

In all seriousness, I do think I am done with features (and bloat).

If I have to be honest though, the only thing I use ExportHtml for is pasting code to emails. It is funny, because ExportHtml started as a way to print from a browser, but I never print code.

0 Likes

#95

Wish I could dig up some 10 second youtube of 2 junkies talking about getting off the gear :smile:

Sublime + Python == Crack :smile:

0 Likes

#96

[quote=“castles_made_of_sand”]
Sublime + Python == Crack :smile:[/quote]

It’s funny because it’s true :smile:. The kind of code I do to pay my bills is very different than this kind of stuff. Python is a very fun language to code in and I also like coding topics that are far away from what I actually do…mainly because they are so different. It can be very addictive.

0 Likes

#97

What sort of stuff you usually write for $ ?

0 Likes

#98

Embedded systems/firmware. I do C/C++/(stare at assembly when I am debugging). A lot of coding directly with the hardware; dealing with registers, keeping memory footprint low, etc.

I like what I do, but stuff like this is a nice break from all the complexity and low level coding.

0 Likes

#99

That shit be whack. My brain just doesn’t cope with C/C++

Waspect for those whose can :smile:

0 Likes

#100

int(*f(char c))(int, long); ?

or, to put it another way…

void *((*fnp[4])())();

0 Likes

#101

[quote=“agibsonsw”]int(*f(char c))(int, long); ?

or, to put it another way…

void *((*fnp[4])())();[/quote]

precisely

0 Likes

#102

[quote=“castles_made_of_sand”]

[quote=“agibsonsw”]int(*f(char c))(int, long); ?

or, to put it another way…

void *((*fnp[4])())();[/quote]

precisely[/quote]

You guys are ridiculous :smile:.

Once you can code in C, you can pretty much code in anything. As soon as you get used to managing your memory and cleaning up, other languages are much easier. The one exception is assembly; that is just painful to code in. I did a small project in straight assembly in college…it was not fun…interesting and a good exercise, but not fun. That is why Python can be so fun, you don’t have to worry about memory so much and types etc. and you can dynamically do stuff, where in C, things are much more rigid.

0 Likes

#103

I quite agree. I wish I had pursued C early on (and Turbo Assembler…). It’s challenging to revisit though, after all the hand-holding that other languages and IDEs offer.

0 Likes

#104

Once you can code in C, you can pretty much code in anything.

Learn C in 21 days (while mastering haskell and clojure as byproduct)

A brain once stretched or something eh?

I’ll try and learn C properly one day. One day…

0 Likes

#105

I never formally learned C; I had one intro to C class (learned about very basic programming things like for loops etc.; basically stuff I already knew) the rest I have had to teach myself on the fly because I had to program robots and embedded projects trying to get my EE degree. As engineers, it is expected we can just learn it.

I remember learning assembly. The professor took about week and gave us a crash course and a very large book on assembly programming for the Motorola HCS12 processor and that was it. Next thing I knew, I was up to my eyeballs in assembly trying to remember if I pulled everything off the stack or not…ugghh. It was the same way with Verilog code for FPGAs and such.

After you start picking up new languages, you realize they are all basically the same, it is just a matter of learning the syntax to express the logic. The trickiest part with C is having to deal with the memory stuff and dealing with data structures like link lists and such…stuff you usually don’t have to do in high level languages because they garbage collect for you, they allocate the memory for you, they provide useful structures for you to use. That is what makes scripting fun, not getting bogged down by all of the memory management crap.

0 Likes

#106

Yeah, I don’t think I have the ability for that micromanagement. Handy to learn just enough to debug ctypes errors though.

0 Likes