📝 Performant plain text editor for iOS with syntax highlighting, line numbers, invisible characters and much more.

Overview

👋 Welcome to Runestone - a performant plain text editor for iOS with code editing features

Runestone uses GitHub's Tree-sitter to parse code to a syntax tree which is used for features that require an understanding of the code in the editor, for example syntax highlighting.

Features

  • Syntax highlighting.
  • Line numbers.
  • Highlight the selected line.
  • Show invisible characters (tabs, spaces and line breaks).
  • Insertion of character pairs, e.g. inserting the trailing quotation mark when inserting the leading.
  • Customization of colors and fonts.
  • Toggle line wrapping on and off.
  • Adjust height of lines.
  • Add a page guide.
  • Add vertical and horizontal overscroll.
  • Highlight ranges in the text view.
  • Search the text using regular expressions.
  • Automatically detects if a file is using spaces or tabs for indentation.

🚀 Getting Started

Please refer to the Getting Started article in the documentation.

📖 Documentation

The documentation of all public types is available at docs.runestone.app. The documentation is generated from the Swift code using Apple's DocC documentation compiler.

🏎 Performance

Runestone was built to be fast. Its good performance is by far mostly thanks to Tree-sitter's incremental parsing and AvalonEdit's approach for managing lines in a document.

When judging the performance of Runestone, it is key to build your app in the release configuration. The optimizations applied by the compiler when using the release configuration becomes very apparent when opening large documents.

📱 Projects

The Runestone framework is used by an app of the same name. The Runestone app is a plain text editor for iPhone and iPad that uses all the features of this framework.

Runestone app icon

Download on the App Store

❤️ Acknowledgments

Comments
  • Crash report

    Crash report

    Hi

    I received several crash reports after using Runestone as the text editor within my app. But I'm not sure how to reproduce it. You may want to take a look.

    Thanks for your work, by the way.

    (Version 0.2.1)

    Thread 0 - (TH_STATE_RUNNING)
    0  CoreFoundation   ___exceptionPreprocess
    1  libobjc.A.dylib  _objc_exception_throw
    2  CoreFoundation   __CFThrowFormattedException
    3  CoreFoundation   _mutateError
    4  CoreFoundation   -[__NSCFString replaceCharactersInRange:withString:]
    5  Surge-iOS        StringView.replaceText(in:with:) (StringView.swift:67:24)
    6  Surge-iOS        TextInputView.replaceText(in:with:selectedRangeAfterUndo:undoActionName:) (TextInputView.swift:1115:45)
    7  Surge-iOS        TextInputView.setMarkedText(_:selectedRange:) (TextInputView.swift:1296:9)
    8  Surge-iOS        @objc TextInputView.setMarkedText(_:selectedRange:) (<compiler-generated>)
    9  UIKitCore        -[UIResponder(UITextInput_Internal) _setAttributedMarkedText:selectedRange:]
    10 UIKitCore        -[UIKBInputDelegateManager setAttributedMarkedText:selectedRange:]
    11 UIKitCore        -[UIKeyboardImpl _setAttributedMarkedText:selectedRange:inputString:lastInputString:searchString:compareAttributes:]
    12 UIKitCore        -[UIKeyboardImpl setMarkedText:selectedRange:inputString:lastInputString:searchString:candidateOffset:liveConversionSegments:highlighSegmentIndex:]
    13 UIKitCore        -[UIKeyboardImpl assertIntermediateText:]
    14 UIKitCore        -[UIKeyboardImpl syncKeyboardToConfiguration:]
    15 UIKitCore        ___55-[UIKeyboardImpl handleKeyboardInput:executionContext:]_block_invoke_2
    16 UIKitCore        -[UIKeyboardTaskEntry execute:]
    17 UIKitCore        -[UIKeyboardTaskQueue continueExecutionOnMainThread]
    18 Foundation       ___NSThreadPerformPerform
    19 CoreFoundation   ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
    20 CoreFoundation   ___CFRunLoopDoSource0
    21 CoreFoundation   ___CFRunLoopDoSources0
    22 CoreFoundation   ___CFRunLoopRun
    23 CoreFoundation   _CFRunLoopRunSpecific
    24 GraphicsServices _GSEventRunModal
    25 UIKitCore        -[UIApplication _run]
    26 UIKitCore        _UIApplicationMain
    27 Surge-iOS        main (main.m:14:16)
    28 dyld             start
    
    bug 
    opened by Blankwonder 17
  • Behaviour of command+left/right with line breaks

    Behaviour of command+left/right with line breaks

    Describe the bug

    I have a question about the behaviour of Runestone when having line breaks and using command + left/right to go to the beginning and end of the line. How it behaves doesn't match my expectation and makes me stop and think what happened.

    Runestone jumps to the end of the "logical" or "unbroken" line, which might be further down, but I expect it to jump to the end of the "broken" line.

    To Reproduce

    Use Runestone and have a long line of text, enable line breaks. Press command + left/right.

    I've tested this on both Catalyst and iPad and it works the same in both.

    Expected behavior

    The caret jumps to the end of the broken line (like Xcode)

    https://user-images.githubusercontent.com/22646/186363628-379e1dd5-7909-483e-b8f5-a43e2ef5da75.mov

    Actual behavior

    The caret jumps to the end of the unbroken line, which might be on the next line down (or further).

    Similarly with command + left. It'd be nice if it jumped to the first non-whitespace character then, too.

    https://user-images.githubusercontent.com/22646/186363590-d15e9d64-2e51-43d3-9432-c2fb3db1439c.mov


    Is this expected behaviour? Is there some way to customise this already? While trying to see why this happened, I noticed that it appears to be UIKit setting the selected text range -- see below. If you agree that this behaviour should be changed, @simonbs , but you don't have time to tackle this, you can also point me in the direction to fix it myself and I'll give it a shot. I tried but couldn't figure out where's the logical place to hook into.

    // MARK: - UITextInput
        var selectedTextRange: UITextRange? {
            get {
                if let range = _selectedRange {
                    return IndexedRange(range)
                } else {
                    return nil
                }
            }
            set {
                // We should not use this setter. It's intended for UIKit to use.
                // It'll invoke the setter in various scenarios, for example when navigating the text using the keyboard.
                let newRange = (newValue as? IndexedRange)?.range
                if newRange != _selectedRange {
                    shouldNotifyInputDelegateAboutSelectionChangeInLayoutSubviews = true
                    _selectedRange = newRange
                    delegate?.textInputViewDidChangeSelection(self)
                }
            }
        }
    
    enhancement 
    opened by nighthawk 9
  • 🐛「Bug」Can't handle Korean input correctly

    🐛「Bug」Can't handle Korean input correctly

    Describe the bug Can't handle Korean input correctly

    Screenshots

    https://user-images.githubusercontent.com/7934444/166901295-93cb41aa-131d-4289-bab3-af121ad6d3c0.MOV

    bug 
    opened by octree 9
  • Crash after subsequent `setState` calls

    Crash after subsequent `setState` calls

    Describe the bug

    When we initialize the TextView with only a text and then call setState again with a language and a theme, the TextView crashes at https://github.com/simonbs/Runestone/blob/bb2451158a4f0d67d2ac310127cc624513afdeaf/Sources/Runestone/RedBlackTree/RedBlackTree.swift#L37 when I interact with the view like double tapping on an empty line, etc.

    To Reproduce

    I have created a branch with a minimal example here https://github.com/simonbs/Runestone/compare/main...haldun:Runestone:haldun/crash?expand=1

    I can repro this on the main branch of Runestone as of the commit https://github.com/simonbs/Runestone/commit/bb2451158a4f0d67d2ac310127cc624513afdeaf

    Expected behavior

    Should not crash.

    Screenshots

    N/A.

    Additional context

    N/A.

    bug 
    opened by haldun 8
  • Scroll to bottom

    Scroll to bottom

    Hey.

    Is there a standard way to scroll the text view to the bottom? UITextView has scrollRangeToVisible, so it can be done by [_textView scrollRangeToVisible:NSMakeRange([_textView.text length], 0)].

    I tried using UIScrollview's methods, but it seems it fails to calculate the correct offset.

    private func scrollToBottom() {
        let bottomOffset = CGPoint(x: 0, y: self.textView!.contentSize.height - self.textView!.bounds.height + self.textView!.contentInset.bottom)
        self.textView?.setContentOffset(bottomOffset, animated: false)
    }
    
    enhancement 
    opened by Blankwonder 8
  • Always insert text when calling `insertText(_:)` programmatically

    Always insert text when calling `insertText(_:)` programmatically

    I came across another subtle difference in behaviour when switching to Runestone: When the TextView is not the first responder, programatically calling insertText with some text didn't do anything, while my previous implementation that used UITextView did append the text.

    This PR changes the behaviour of TextView.insertText(_:) to also append the text at the end. I kept the behaviour of TextInputView.insertText(_:) the same (i.e., it will not insert the text if there's no marked or selected range) in case that this was on purpose.

    opened by nighthawk 7
  • String length conflation warning

    String length conflation warning

    In code scanning phase, CodeQL found an issue in IndentController.swift file line 71:

    This String.utf16 length is used in a String, but it may not be equivalent.

    Using a length value from an NSString in a String, or a count from a String in an NSString, may cause unexpected behavior including (in some cases) buffer overwrites. This is because certain unicode sequences are represented as one character in a String but as a sequence of multiple characters in an NSString. For example, a 'thumbs up' emoji with a skin tone modifier (👍🏿) is represented as U+1F44D (👍) then the modifier U+1F3FF.

    opened by haldun 5
  • Can't open Package.swift in Xcode 14.*

    Can't open Package.swift in Xcode 14.*

    Describe the bug Downloading the repo from GitHub and double clicking on Package.swift fails to build.

    To Reproduce Download the repo from GitHub, double click Package.swift.

    Expected behavior Builds.

    Screenshots

    image

    I get a similar error when trying to open the Example project:

    image

    Additional context I checked Getting Started but I didn't see any additional steps spelled out. I'm not sure what I'm doing wrong

    bug 
    opened by icanzilb 5
  • Automatic theme switches when toggling light/dark mode

    Automatic theme switches when toggling light/dark mode

    Is your feature request related to a problem? Please describe. The theme system allows specifying a single theme, which would be optimised for either light or dark mode. There doesn't yet seem a way to either set a single theme that supports both light and dark mode, or specify a theme per interface style.

    Describe the solution you'd like This could be addressed by providing multiple themes, one per UIUserInterfaceStyle, or by providing support for themes that support multiple interface styles.

    Describe alternatives you've considered

    • I've tried adjusting the Color Set in my asset catalog to provide alternative colours for light and dark mode. This seems to work for a subset of colours, but notable not for the background colours. I'm also not sure if that's fully compatible with the internals of Runestone.
    • Detect this on my view controllers, and then set the new theme.

    Additional context I'm happy to provide a PR for this, but I'm not sure if this is desired and, if so, which approach would be the best fit for this framework.

    enhancement 
    opened by nighthawk 5
  • Option to disable font ligatures

    Option to disable font ligatures

    Is your feature request related to a problem? Please describe. "The problem" is that Runestone uses font ligatures, so it joins characters like == != <= => <==> together.

    Example: (with JetBrains Mono)

    image

    Describe the solution you'd like An option to disable font ligatures.

    Describe alternatives you've considered /

    enhancement 
    opened by amadejpapez 5
  • insertText(...) does not update caret position in TextView

    insertText(...) does not update caret position in TextView

    Describe the bug Inserting characters to a TextView programmatically, for example from a keyboard input view with quick access special keys, seems to be done by calling insertText(_ text: String) method on TextView. This adds the characters and they appear, but the caret is not moved after the newly inserted characters but stays where it was, even though the implementation seems to attempt to move the caret.

    Typing more characters using the native keyboard does move the caret after the new text. Also moving the caret using arrow keys does begin moving from the position where the caret was supposed to be. So it seems like the caret position (selectedRange?) has the correct value, but it is not reflected in the TextView after text insertion.

    I also tried to move the caret programmatically, by adjusting selectedRange's location property, but it results in the caret being moved too many steps ahead.

    To Reproduce

    • Call textView.insertText("a") on an existing TextView instance.
    • New characters appear but the caret stays in the same location before the inserted characters.

    Expected behavior Caret should move to a position after the newly inserted characters.

    bug 
    opened by PasiSalenius 4
  • Folding code blocks

    Folding code blocks

    Is your feature request related to a problem? Please describe. Folding code blocks would be a very nice addition 😋

    Describe the solution you'd like Clicking an arrow or plus/minus sign would toggle expanding (unfold) and collapsing (fold) of an user selected code block. This allows the user to manage large amounts of text while viewing only those subsections that are currently of interest.

    Reference https://en.wikipedia.org/wiki/Code_folding

    enhancement 
    opened by fmt 1
  • Cannot use from Swift Playgrounds

    Cannot use from Swift Playgrounds

    Is your feature request related to a problem? Please describe. Swift Playgrounds (iPad in my case but should be applicable on Mac as well) cannot import packages that have C code included.

    Describe the solution you'd like I haven’t looked deeply into the implementation but I’d hope for either of the following:

    1. A separate package for the editor vs the language parsers
    2. Perhaps the language/C code could be provided via a pre-compiled package instead?

    Again, I may be over-simplifying the solution as I’m not familiar enough to understand the problem atm.

    Describe alternatives you've considered Atm, I have to move the project to Xcode if I want to include this package (which I do), but I’m holding off on the editor bits for now because everything else can be built successfully on iPad.

    Additional context Thank you for open sourcing such a high quality editor. I’ve worked on this kind of thing before and its an truly a huge undertaking, you’ve done an incredible job! I’ve bought your Runestone app as well and its become a huge part of my daily workflow 👌

    It doesn’t have language support for some things (like XML) but I noticed I can still open it as plain text which is great 👍

    enhancement 
    opened by shaps80 5
  • Multicursor support

    Multicursor support

    Multicursor support is difficult if not impossible to implement in touch-based text editors, but since iPads support both keyboard and mouse/trackpad it would be a nice feature to have when, e.g., a Magic Keyboard is attached.

    enhancement 
    opened by xAlien95 2
  • Minimum Gutter Width Option

    Minimum Gutter Width Option

    It'd be great to have an option on gutter layout to specify a minimum width. Specifically to solve the text view "jumping" when hitting double (or more) digits. This would be especially nice if code is less than 3 digits.

    repro

    enhancement 
    opened by zachgibson 2
  • Anyway to get the TreeSitterTree inside the textView?

    Anyway to get the TreeSitterTree inside the textView?

    Hello, I'm integrating the Runestone framework into my rule editor, and it's awesome, especially the highlight and line number stuffs!

    And after integrating the syntax highlight, I try to do some analysis using the tree parsed by the tree-sitter, and I found the tree is stored in textView privately. So, is there any way to get that tree inside the textView?

    enhancement 
    opened by Kaelzs 5
  • Support for UIContentSizeCategoryAdjusting

    Support for UIContentSizeCategoryAdjusting

    Is your feature request related to a problem? Please describe. Currently apps which utilise UILabel, UITextView and UITextField are able to support dynamic type via opt in of adjustsFontForContentSizeCategory. Once a developer enables this property, users are able to have an app experience that caters to their font size preferences for example:

    • Larger font for users with difficulty seeing.
    • Smaller font for users which want to display more content at once.

    Describe the solution you'd like

    • TextView conforms to UIContentSizeCategoryAdjusting.
    • adjustsFontForContentSizeCategory can be set per TextView instance.
    • Internally this updates the fonts for both line number and text editor views.

    Describe alternatives you've considered Without modifying the original source code, a workaround currently is to set a new theme with updated fonts every time a user changes font size. This approach however doesn't seem as performant as only updating internal font properties directly.

    Additional context

    enhancement 
    opened by ptrkstr 1
Releases(0.2.10)
  • 0.2.10(Nov 8, 2022)

    What's Changed

    • Send selectionChanged() to UITextInputView when deleting backwards by @simonbs in https://github.com/simonbs/Runestone/pull/244

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.9...0.2.10

    Source code(tar.gz)
    Source code(zip)
  • 0.2.9(Nov 7, 2022)

    What's Changed

    • Fixes issue entering marked text by @simonbs in https://github.com/simonbs/Runestone/pull/242
    • Updates to Tree-sitter 0.20.7 by @simonbs in https://github.com/simonbs/Runestone/pull/243

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.8...0.2.9

    Source code(tar.gz)
    Source code(zip)
  • 0.2.8(Nov 2, 2022)

    What's Changed

    • Updates position of caret when pasting by @simonbs in https://github.com/simonbs/Runestone/pull/221
    • isPosition(_:atLineBoundaryInDirection:) checks for line boundaries by @simonbs in https://github.com/simonbs/Runestone/pull/223
    • Fixes issue entering multiple combined characters by @simonbs in https://github.com/simonbs/Runestone/pull/225
    • Clears LineControllerStorage when setting TextViewState by @simonbs in https://github.com/simonbs/Runestone/pull/234
    • Updates LineManager and StringView on tokenizer by @simonbs in https://github.com/simonbs/Runestone/pull/235
    • Disables processing character pairs when combining Korean letters by @simonbs in https://github.com/simonbs/Runestone/pull/236
    • Fixes Korean letters sometimes not being joined by @simonbs in https://github.com/simonbs/Runestone/pull/240

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.7...0.2.8

    Source code(tar.gz)
    Source code(zip)
  • 0.2.7(Oct 12, 2022)

    What's Changed

    • Fixes highlighted range not rendered by @simonbs in https://github.com/simonbs/Runestone/pull/216
    • closestIndex(to:) returns beginning of line if line fragment is unavailable by @simonbs in https://github.com/simonbs/Runestone/pull/218

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.6...0.2.7

    Source code(tar.gz)
    Source code(zip)
  • 0.2.6(Oct 9, 2022)

    What's Changed

    • IndentController uses UTF-16 length only when safe by @simonbs in https://github.com/simonbs/Runestone/pull/207
    • contentOffsetForScrollingToVisibleRect(_:) uses adjusted content inset to determine viewport size by @simonbs in https://github.com/simonbs/Runestone/pull/214

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.5...0.2.6

    Source code(tar.gz)
    Source code(zip)
  • 0.2.5(Sep 26, 2022)

    What's Changed

    • Fixes potential crash when layouting lines by @simonbs in https://github.com/simonbs/Runestone/pull/202
    • Removes unused parameter from scrollRangeToVisible(_:) by @simonbs in https://github.com/simonbs/Runestone/pull/203
    • Removes easy selection of line ending by @simonbs in https://github.com/simonbs/Runestone/pull/205
    • Only typeset lines when absolutely needed by @simonbs in https://github.com/simonbs/Runestone/pull/204

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.4...0.2.5

    Source code(tar.gz)
    Source code(zip)
  • 0.2.4(Sep 25, 2022)

    What's Changed

    • Moves replace action to front of edit menu by @simonbs in https://github.com/simonbs/Runestone/pull/179
    • Adds German and Finnish locales by @amay5267 in https://github.com/simonbs/Runestone/pull/180
    • Moves files into separate folders by @simonbs in https://github.com/simonbs/Runestone/pull/183
    • Adds missing structure to documentation by @simonbs in https://github.com/simonbs/Runestone/pull/182
    • Fixes path to resources for default theme by @simonbs in https://github.com/simonbs/Runestone/pull/185
    • Updates French locales and adds Spanish locales by @amay5267 in https://github.com/simonbs/Runestone/pull/181
    • Moves logic out of LayoutManager and into separate types by @simonbs in https://github.com/simonbs/Runestone/pull/184
    • Fixes an issue where highlight rects were not placed correctly by @simonbs in https://github.com/simonbs/Runestone/pull/186
    • No longer moves caret to next line when selecting text by @simonbs in https://github.com/simonbs/Runestone/pull/187
    • linePosition(at:) returns correct column number by @simonbs in https://github.com/simonbs/Runestone/pull/188
    • Fixes incorrect line fragment width by @simonbs in https://github.com/simonbs/Runestone/pull/189
    • Updates caret location after moving lines by @simonbs in https://github.com/simonbs/Runestone/pull/190
    • Avoids joining two lines when moving lines to a line that does no end with a line break by @simonbs in https://github.com/simonbs/Runestone/pull/191
    • Ensures moveCaret(to:) does not move caret to non-existing line by @simonbs in https://github.com/simonbs/Runestone/pull/192
    • Adds support for replacement strings containing \n, \r, and \t by @simonbs in https://github.com/simonbs/Runestone/pull/193
    • Fixes default value of isLineWrappingEnabled by @simonbs in https://github.com/simonbs/Runestone/pull/195
    • adds Japanese locales by @amay5267 in https://github.com/simonbs/Runestone/pull/194
    • Sets contentInsetAdjustmentBehavior = .always in example project by @simonbs in https://github.com/simonbs/Runestone/pull/196
    • Makes scrollRangeToVisible(_:animated:) public by @simonbs in https://github.com/simonbs/Runestone/pull/197
    • Improves logic for scrolling to a specified range by @simonbs in https://github.com/simonbs/Runestone/pull/198
    • 💥 Removes the automaticScrollInset property by @simonbs in https://github.com/simonbs/Runestone/pull/199
    • Only enables easy selection of delimiter when selecting text by @simonbs in https://github.com/simonbs/Runestone/pull/200

    New Contributors

    • @amay5267 made their first contribution in https://github.com/simonbs/Runestone/pull/180

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.3...0.2.4

    Source code(tar.gz)
    Source code(zip)
  • 0.2.3(Sep 11, 2022)

    What's Changed

    • Adds common symbols for invisible characters to documentation by @simonbs in https://github.com/simonbs/Runestone/pull/174
    • Ensures input delegate is informed about the selection change in selectAll(_:) by @simonbs in https://github.com/simonbs/Runestone/pull/176
    • node(containingLocation:) returns an optional by @simonbs in https://github.com/simonbs/Runestone/pull/175
    • Fixes issue where TextView could not be scrolled by @simonbs in https://github.com/simonbs/Runestone/pull/178

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.2...0.2.3

    Source code(tar.gz)
    Source code(zip)
  • 0.2.2(Sep 4, 2022)

    What's Changed

    • Attempts to fix crash in setMarkedText(_:selectedRange:) by @simonbs in https://github.com/simonbs/Runestone/pull/149
    • Decreases width of caret by @simonbs in https://github.com/simonbs/Runestone/pull/151
    • Places the caret correctly when navigating between lines by @simonbs in https://github.com/simonbs/Runestone/pull/152
    • Adds LineControllerStorage by @simonbs in https://github.com/simonbs/Runestone/pull/150
    • fix sample code by @Shinolr in https://github.com/simonbs/Runestone/pull/154
    • Add FR localization by @W1W1-M in https://github.com/simonbs/Runestone/pull/155
    • Fixes width of selection rects by @simonbs in https://github.com/simonbs/Runestone/pull/156
    • Prevents selected range and marked range from being negative by @simonbs in https://github.com/simonbs/Runestone/pull/157
    • Uses label color as default caret color by @simonbs in https://github.com/simonbs/Runestone/pull/159
    • Fixes incorrect filename by @simonbs in https://github.com/simonbs/Runestone/pull/160
    • Fixes issue where theme was not applied initially by @simonbs in https://github.com/simonbs/Runestone/pull/161
    • Fixes menu not shown correctly on Catalyst by @simonbs in https://github.com/simonbs/Runestone/pull/163
    • LineManager rebuilds tree from string in StringView by @simonbs in https://github.com/simonbs/Runestone/pull/162
    • Updates the DefaultTheme by @simonbs in https://github.com/simonbs/Runestone/pull/164
    • Improves navigation with the keyboard by @simonbs in https://github.com/simonbs/Runestone/pull/153
    • Fixes page guide color in default theme by @simonbs in https://github.com/simonbs/Runestone/pull/165
    • Optimizes default them in dark mode for system background color by @simonbs in https://github.com/simonbs/Runestone/pull/166
    • Fixes issue where the -textInputViewDidChangeSelection(_:) was called too many times by @simonbs in https://github.com/simonbs/Runestone/pull/167
    • Implements isPosition(_:atLineBoundaryInDirection:) by @simonbs in https://github.com/simonbs/Runestone/pull/168
    • Adds interactive tutorials to the documentation by @simonbs in https://github.com/simonbs/Runestone/pull/169
    • Adds link to tutorials by @simonbs in https://github.com/simonbs/Runestone/pull/170

    New Contributors

    • @Shinolr made their first contribution in https://github.com/simonbs/Runestone/pull/154
    • @W1W1-M made their first contribution in https://github.com/simonbs/Runestone/pull/155

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.1...0.2.2

    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Aug 15, 2022)

    What's Changed

    • Support search in a specific range in the text view by @rebornix in https://github.com/simonbs/Runestone/pull/136
    • API: convert row/column to offset by @rebornix in https://github.com/simonbs/Runestone/pull/138
    • -gestureRecognizerShouldBegin(_:) calls super instead of returning true by @simonbs in https://github.com/simonbs/Runestone/pull/139
    • Treats punctuation characters as word boundaries by @simonbs in https://github.com/simonbs/Runestone/pull/140
    • Updates caret position when setting string by @simonbs in https://github.com/simonbs/Runestone/pull/143
    • Clears undo stack when setting string by @simonbs in https://github.com/simonbs/Runestone/pull/144
    • Sets correct selected range when editing marked text by @simonbs in https://github.com/simonbs/Runestone/pull/145

    New Contributors

    • @rebornix made their first contribution in https://github.com/simonbs/Runestone/pull/136

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.2.0...0.2.1

    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Jul 30, 2022)

    What's Changed

    • Long pressing to select text would scroll the text view by @simonbs in https://github.com/simonbs/Runestone/pull/97
    • Adds Package.resolved by @simonbs in https://github.com/simonbs/Runestone/pull/99
    • Updates parser header by @simonbs in https://github.com/simonbs/Runestone/pull/100
    • Fixes string range out of bounds by @simonbs in https://github.com/simonbs/Runestone/pull/101
    • Exposes more UITextInput functions in TextView by @simonbs in https://github.com/simonbs/Runestone/pull/102
    • 💥 Adds matchMethod to SearchQuery by @simonbs in https://github.com/simonbs/Runestone/pull/104
    • Adds Package.resolved by @simonbs in https://github.com/simonbs/Runestone/pull/105
    • Uses UIMenuEditInteraction on iOS 16 by @simonbs in https://github.com/simonbs/Runestone/pull/92
    • Fixes shiftLineLeft(:) and shiftLineRight(:) reversed by @simonbs in https://github.com/simonbs/Runestone/pull/106
    • Only inserts text once when shifting left and right by @simonbs in https://github.com/simonbs/Runestone/pull/107
    • Removes swift-docc-plugin by @simonbs in https://github.com/simonbs/Runestone/pull/108
    • Updates bottom inset to accommodate for keyboard in Example project by @simonbs in https://github.com/simonbs/Runestone/pull/113
    • Layout lines up to the specified line by @simonbs in https://github.com/simonbs/Runestone/pull/114
    • Notify delegate that the content size has been invalidated by @simonbs in https://github.com/simonbs/Runestone/pull/115
    • Adds Go to Line to example project by @simonbs in https://github.com/simonbs/Runestone/pull/116
    • Supports scrolling to a range of text by @simonbs in https://github.com/simonbs/Runestone/pull/118
    • Adds support for isFindInteractionEnabled by @simonbs in https://github.com/simonbs/Runestone/pull/119
    • Fixes incorrect range returned from -customRangeOfComposedCharacterSequences(for:) by @simonbs in https://github.com/simonbs/Runestone/pull/121
    • Fixes typo by @simonbs in https://github.com/simonbs/Runestone/pull/123
    • Removes extraneous extension in example project by @simonbs in https://github.com/simonbs/Runestone/pull/125
    • Add support for line break mode in TextView by @PasiSalenius in https://github.com/simonbs/Runestone/pull/124
    • Add Contributing section to README by @simonbs in https://github.com/simonbs/Runestone/pull/126
    • Fixes code style by @simonbs in https://github.com/simonbs/Runestone/pull/127
    • Disables "Based on dependency analysis" on SwiftLint build phase by @simonbs in https://github.com/simonbs/Runestone/pull/128
    • Improves timing when notifying input delegate of selection changes (Thanks Alexander Blach (@blach)!) by @simonbs in https://github.com/simonbs/Runestone/pull/129
    • Removes unused code by @simonbs in https://github.com/simonbs/Runestone/pull/133
    • Only redisplays visible lines by @simonbs in https://github.com/simonbs/Runestone/pull/134

    New Contributors

    • @PasiSalenius made their first contribution in https://github.com/simonbs/Runestone/pull/124

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.1.2...0.2.0

    Source code(tar.gz)
    Source code(zip)
  • 0.1.2(Jun 17, 2022)

    What's Changed

    • No longer applies captures with unsupported predicates by @simonbs in https://github.com/simonbs/Runestone/pull/9
    • Uses line break instead of cluster break by @simonbs in https://github.com/simonbs/Runestone/pull/10
    • Adds Tree-sitter submoduel with HTTPS by @simonbs in https://github.com/simonbs/Runestone/pull/12
    • Fix small typos by @multigreg in https://github.com/simonbs/Runestone/pull/14
    • Fixes SwiftLint issues by @simonbs in https://github.com/simonbs/Runestone/pull/20
    • Removes unsafe build flag from TreeSitter target by @simonbs in https://github.com/simonbs/Runestone/pull/18
    • Removes TreeSitterLanguages dependency from Example project by @simonbs in https://github.com/simonbs/Runestone/pull/22
    • Renames editorView to scrollView by @simonbs in https://github.com/simonbs/Runestone/pull/23
    • Renames additionalInset to safeAreaInset by @simonbs in https://github.com/simonbs/Runestone/pull/24
    • Renames maximumLineWidth to constrainingLineWidth by @simonbs in https://github.com/simonbs/Runestone/pull/25
    • Improves comments by @simonbs in https://github.com/simonbs/Runestone/pull/26
    • Fixes issue where setupViewHierarchy() didn't remove all subviews by @simonbs in https://github.com/simonbs/Runestone/pull/27
    • Removes unused 'animated' parameter by @simonbs in https://github.com/simonbs/Runestone/pull/29
    • Returns no selection rects when range is empty by @simonbs in https://github.com/simonbs/Runestone/pull/28
    • Ensures caret is visible when moved past trailing edge by @simonbs in https://github.com/simonbs/Runestone/pull/30
    • Caps scroll offset to minimum and maximum offset by @simonbs in https://github.com/simonbs/Runestone/pull/31
    • Enforces constraining line width by @simonbs in https://github.com/simonbs/Runestone/pull/36
    • Splits example project into Swift packages by @simonbs in https://github.com/simonbs/Runestone/pull/37
    • Fixes issue where long pressing to select text would scroll by @simonbs in https://github.com/simonbs/Runestone/pull/38
    • Adds support for showing non-breaking spaces by @simonbs in https://github.com/simonbs/Runestone/pull/39
    • Improves text selection by @simonbs in https://github.com/simonbs/Runestone/pull/33
    • Validates predicates of injection captures by @simonbs in https://github.com/simonbs/Runestone/pull/41
    • Uses correct font for line numbers by @simonbs in https://github.com/simonbs/Runestone/pull/44
    • No longer groups child layers by languages by @simonbs in https://github.com/simonbs/Runestone/pull/45
    • Skip empty captures by @simonbs in https://github.com/simonbs/Runestone/pull/46
    • Enables Catalyst in Example project by @simonbs in https://github.com/simonbs/Runestone/pull/47
    • Fixes crash in compare(_:to:) on Catalyst by @simonbs in https://github.com/simonbs/Runestone/pull/48
    • Removes debug code by @simonbs in https://github.com/simonbs/Runestone/pull/49
    • Fixes issue where carriage return was not rendered by @simonbs in https://github.com/simonbs/Runestone/pull/52
    • Adds support for specifying line endings by @simonbs in https://github.com/simonbs/Runestone/pull/53
    • Updates documentation by @simonbs in https://github.com/simonbs/Runestone/pull/54
    • Only prepares text for insertion when caused by external event by @simonbs in https://github.com/simonbs/Runestone/pull/55
    • Considers Windows-style line breaks (\r\n) a composed character sequence by @simonbs in https://github.com/simonbs/Runestone/pull/56
    • Fixes typo in -sendSelectionChangedToTextSelectionView() by @simonbs in https://github.com/simonbs/Runestone/pull/57
    • Uses line position to restore selected range when replacing text by @simonbs in https://github.com/simonbs/Runestone/pull/58
    • Makes symbol on line ending public by @simonbs in https://github.com/simonbs/Runestone/pull/59
    • Fixes -textInputViewDidChangeSelection(_:) called too early by @simonbs in https://github.com/simonbs/Runestone/pull/61
    • Add isEditable and isSelectable property to TextView by @twodayslate in https://github.com/simonbs/Runestone/pull/60
    • Fix documentation typos by @AndrewBennet in https://github.com/simonbs/Runestone/pull/62
    • Fixes linguist by @simonbs in https://github.com/simonbs/Runestone/pull/63
    • Adds CODEOWNERS by @simonbs in https://github.com/simonbs/Runestone/pull/64
    • Uses byte indices only in -treeSitterLanguageMode(_:bytesAt:) by @simonbs in https://github.com/simonbs/Runestone/pull/65
    • -customRangeOfComposedCharacterSequences(for:) builds upon native range by @simonbs in https://github.com/simonbs/Runestone/pull/66
    • Removes push to main trigger by @simonbs in https://github.com/simonbs/Runestone/pull/67
    • Attempts setting up .spi.yml by @simonbs in https://github.com/simonbs/Runestone/pull/70
    • Adds shields to README by @simonbs in https://github.com/simonbs/Runestone/pull/71
    • Only runs Build and Test workflow when source has changed by @simonbs in https://github.com/simonbs/Runestone/pull/72
    • Adds workflow for building example project by @simonbs in https://github.com/simonbs/Runestone/pull/73
    • Uses correct shields in README by @simonbs in https://github.com/simonbs/Runestone/pull/74
    • Fixes workflow name by @simonbs in https://github.com/simonbs/Runestone/pull/75
    • Adds workflow_dispatch trigger to all workflows by @simonbs in https://github.com/simonbs/Runestone/pull/76
    • Adds GitHub shields to README by @simonbs in https://github.com/simonbs/Runestone/pull/77
    • Adds Twitter shield to README by @simonbs in https://github.com/simonbs/Runestone/pull/78
    • Don't silently absorb error, at least log it in DEBUG mode by @nighthawk in https://github.com/simonbs/Runestone/pull/84
    • Prefer `` when linking to symbols within the package by @eliperkins in https://github.com/simonbs/Runestone/pull/83
    • Only set isPrepared to true after it really is prepared by @nighthawk in https://github.com/simonbs/Runestone/pull/85
    • Fixes issue where caret position is not updated by @simonbs in https://github.com/simonbs/Runestone/pull/86
    • Updates caret position after toggling line wrapping by @simonbs in https://github.com/simonbs/Runestone/pull/88
    • Fixes code style in TextInputStringTokenizer by @simonbs in https://github.com/simonbs/Runestone/pull/89
    • Improves handling of text selection by @simonbs in https://github.com/simonbs/Runestone/pull/90
    • Scrolls to zero content offset when within text container inset by @simonbs in https://github.com/simonbs/Runestone/pull/91
    • Text view would scroll when editing began by @simonbs in https://github.com/simonbs/Runestone/pull/93
    • Clears cached highlighted rects when changing theme by @simonbs in https://github.com/simonbs/Runestone/pull/94
    • Always insert text when calling insertText(_:) programmatically by @nighthawk in https://github.com/simonbs/Runestone/pull/87
    • Allow subclassing TextView and overriding certain methods by @nighthawk in https://github.com/simonbs/Runestone/pull/68
    • Adds UITextInteractions to TextInputView by @simonbs in https://github.com/simonbs/Runestone/pull/95
    • Fixes caret position not updated by @simonbs in https://github.com/simonbs/Runestone/pull/96

    New Contributors

    • @multigreg made their first contribution in https://github.com/simonbs/Runestone/pull/14
    • @twodayslate made their first contribution in https://github.com/simonbs/Runestone/pull/60
    • @AndrewBennet made their first contribution in https://github.com/simonbs/Runestone/pull/62
    • @nighthawk made their first contribution in https://github.com/simonbs/Runestone/pull/84
    • @eliperkins made their first contribution in https://github.com/simonbs/Runestone/pull/83

    Full Changelog: https://github.com/simonbs/Runestone/compare/0.1.0...0.2.0

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(May 6, 2022)

  • 0.1.0(May 5, 2022)

    This is the initial release of Runestone, an open source framework for creating performant plain text editors on iPhone and iPad with syntax highlighting, line numbers, a page guide, theming and much more.

    The version is published as 0.1.0 to indicate that the public API may not be stable. At this point I've used the framework in my Runestone app for iPhone and iPad so the framework has proven to work but I'm looking for input on the API before considering it stable.

    Source code(tar.gz)
    Source code(zip)
Owner
Simon Støvring
I tinker with iOS automation and poke at private APIs. Working on Runestone, Scriptable, Jayson, and Data Jar.
Simon Støvring
This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer (short for FST) in c++ language.This FST C++ open source project has much significant advantages.

Orchid-Fst 1. Project Overview This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer , which

Bin Ding 10 Oct 18, 2022
An intrusive C++17 implementation of a Red-Black-Tree, a Weight Balanced Tree, a Dynamic Segment Tree and much more!

This is Ygg (short for Yggdrasil), a C++17 implementation of several intrusive data structures: several balanced binary search trees: a red-black Tree

Lukas Barth 98 Dec 25, 2022
data structures which I've tried to implement in C++, much more incoming 👨‍💻

This repository contains some data structures which I've tried to implement, much more incoming ??‍?? I'm definitely not a C++ expert, so the code is

Wiktor Zając 2 Dec 21, 2021
This is a curve topology verification tool based on Fast Linking Numbers for Topology Verification of Loopy Structures.

Fast Linking Numbers This tool, called verifycurves, takes input models that consist of closed-loop curves, and outputs a topology certificate as a .t

Ante Qu 23 Dec 24, 2022
C++ library to create dynamic structures in plain memory of shared-memory segments

Ищи описание на хабре @mrlolthe1st. #define _CRT_SECURE_NO_WARNINGS #include "shared_structures.h" #include <iostream> #include <fstream> #include <ca

Александр Новожилов 4 Mar 30, 2022
Va1 is a simple character converter. It converts characters into nums, might be used in encryption protocols or as independent algorithm.

Va1 What is it? Va1 is a simple character converter. It converts characters into nums, might be used in encryption protocols or as independent algorit

Mr.Red 1 Dec 22, 2021
Like neofetch, but much faster because written in c. Only Linux.

fastfetch fastfetch is a neofetch like tool for fetching system information and displaying them in a pretty way. It is written in c to achieve much be

Linus Dierheimer 490 Jan 7, 2023
tree-sitter parser and syntax highlighter for the Dwarf Fortress raw language

tree-sitter-dfraw A simple language parser and highlighter made with tree-sitter tokyonight nightfly Using with nvim-treesitter Please refer to the ad

null 2 Apr 1, 2022
A library to convert Uber's H3 geo-index to LatLng vertices for Kotlin Multiplatform Mobile iOS and Android

A library to convert Uber's H3 geo-index to LatLng vertices for Kotlin Multiplatform Mobile iOS and android Features Uber H3 in one interface Common i

LINE 9 Jul 12, 2022
High performance build system for Windows, OSX and Linux. Supporting caching, network distribution and more.

FASTBuild FASTBuild is a build system for Windows, OSX and Linux, supporting distributed compilation and object caching. It is used by many game devel

FASTBuild 997 Dec 30, 2022
A collection of multiple types of lists used during pentesting, collected in one place. List types include usernames, passwords, combos, wordlist and may more..

Access list is a collection of multiple types of lists used during pentesting, collected in one place, created by Undercode This list include a collec

UNDERCODE UTILITIES 10 Nov 21, 2022
A collection of libraries, data structures, and more that I have created to make coding in C less painful.

ctools A collection of libraries, data structures, and more that I have created to make coding in C less painful. Data structures There are many data

null 3 Nov 27, 2021
100daysofDSA - Explore about arrays, linked lists, stacks & queues, graphs, and more to master the foundations of data structures & algorithms!

Explore about arrays, linked lists, stacks & queues, graphs, and more to master the foundations of data structures & algorithms!

null 27 Oct 29, 2022
heuristically and dynamically sample (more) uniformly from large decision trees of unknown shape

PROBLEM STATEMENT When writing a randomized generator for some file format in a general-purpose programming language, we can view the resulting progra

John Regehr 4 Feb 15, 2022
Nodable is node-able. The goal of Nodable is to provide an original hybrid source code editor, using both textual and nodal paradigm.

Nodable is node-able ! Introduction: The goal of Nodable is to provide an original hybrid source code editor, using both textual and nodal paradigm. I

Bérenger Dalle-Cort 148 Dec 21, 2022
Open-source graph editor, with built-it step-by-step Dijkstra's Algorithm.

Visual Dijkstra - Simple visual graph editor, with built-in step-by-step Dijkstra's algorithm Visual Dijkstra is a free and open-source tool, designed

Samuele Girgenti 31 Oct 10, 2022
Flexible level editor

Tiled Map Editor - https://www.mapeditor.org/ About Tiled Tiled is a general purpose tile map editor for all tile-based games, such as RPGs, platforme

mapeditor.org 9.3k Dec 31, 2022
What the Package Does (One Line, Title Case)

inside The goal of insidecpp11 is to do fast point in polygon classification, with cpp11. We are comparing a few ways of implementing this, essentiall

diminutive 3 Feb 11, 2022
What the Package Does (One Line, Title Case)

--- output: github_document --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set

diminutive 2 Feb 11, 2022