@taxorubio@fosstodon.org
@taxorubio@fosstodon.org avatar

taxorubio

@taxorubio@fosstodon.org

He/him. Free Software advocate. I spend more time thinking about cool projects than working on them,.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

taxorubio, to programming
@taxorubio@fosstodon.org avatar

It's one of those Mondays...

taxorubio,
@taxorubio@fosstodon.org avatar

So it turns out that every time you don't use fixed-width numbers you effectively make your software a platform compatiblity nightmare due to the differences between number sizes in different data models: https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models

Once you don't agree with the size of long, you're bound to either perform thousands of runtime casts with possible loss of data or change all your code to use fixed-width numbers.

Fun times!

taxorubio,
@taxorubio@fosstodon.org avatar

I hereby declare war on int.

scy, to vim
@scy@chaos.social avatar

There are days when I'd like to throw Vim at the wall.

:set stl=%f%{&modified?'\ •':''}

will have a status line like

README.md •

with the bullet point (•) if the file is modified.

:set stl=%{fnamemodify(expand('%%:p'),':~:.')}%{&modified?'\ •':''}

will eat the space before the bullet point for some reason.

All I did is replace %f with the %{…} expression.

This happens both in #Vim 9.0.1378 and #Neovim 0.7.2, and also if I replace • with any other character.

Ideas, anyone?

taxorubio,
@taxorubio@fosstodon.org avatar

@scy It looks like a bug. Using two spaces (\ \ ) makes it work. What's more, adding a space before the &modified block (}\ %{&modified) adds two spaces instead of one. I think that you should report it upstream.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • InstantRegret
  • mdbf
  • osvaldo12
  • magazineikmin
  • tacticalgear
  • rosin
  • thenastyranch
  • Youngstown
  • Durango
  • slotface
  • everett
  • kavyap
  • DreamBathrooms
  • JUstTest
  • khanakhh
  • ethstaker
  • cubers
  • normalnudes
  • tester
  • GTA5RPClips
  • cisconetworking
  • ngwrru68w68
  • megavids
  • provamag3
  • Leos
  • modclub
  • lostlight
  • All magazines