Skip to content

Instantly share code, notes, and snippets.

@MichaelJBerk
MichaelJBerk / SelectionDelay.swift
Created March 17, 2026 19:48
A property wrapper that adds a delay when setting the underlying value When setting the value to nil, this property wrapper adds a delay before the value can be changed again. This is useful to avoid certain UI bugs that can occur when changing selection too quickly
///A property wrapper that adds a delay when setting the underlying value
///
///When setting the value to nil, this property wrapper adds a delay before the value can be changed again. This is useful to avoid certain UI bugs that can occur when changing selection too quickly
@propertyWrapper @Observable
final class SelectionDelay<Value: Identifiable & Equatable> {
private var allowSelection = true
private var baseValue: Value?
private var timer: Timer?
private let delay: TimeInterval
@MichaelJBerk
MichaelJBerk / macOS-gui-text-editors.md
Created May 24, 2022 16:54
An overview of various general-purpose text editors for macOS

GUI Text Editors for macOS

I've compiled a list of general-purpose1 GUI text editors/IDEs for macOS. I've spent some amount of time playing around with each of these2 to get an idea for what they offer. If you have an other ideas/suggestions, please open a PR and suggest them.

  • BBEdit
    • Offers a subset of features for free, with a 14-day trial for the full version
    • $50 for the latest major release from Barebones.com, or as a subscription from the App Store
      • Access to the major version without paying extra to upgrade
  • $40 a year, or $4 a month