Giter VIP home page Giter VIP logo

text-document's People

Contributors

as-cii avatar maxbrunsfeld avatar mnquintana avatar vramana avatar zehcnas34 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

text-document's Issues

Inserting text in between adjacent markers makes them overlap

When we create two adjacent markers and insert text between them, that extends both markers and makes them overlap.

For example, given a buffer

{abc}|{efg}

(where {} denote a marker and | denotes a cursor),
entering d results in

{abc{d|}efg}

with both markers now containing the d character.

I think this is due to the initial situation being indistinguishable from (and being handled as)

{abd{|}def}

in which the markers already overlap, just with no text in between them.

One way to encounter this situation is when expanding a snippet with adjacent placeholders like (in snippet syntax)

${1:one}${2:two}

Replacing one with ab, say, results in these intermediate states (in the notation above):

{a|}{two}
{a{b|}two}

which means jumping to the second tab stop would mark the b we just entered at the first tab stop.

I can see that there's no obvious "correct" approach to take here, so maybe this behaviour is fine? It seems like restriction on the capability of snippets though.

Code Formatting Transformations Hooks

One idea that I've had for "the perfect editor" (which is now Atom in my mind) is the ability to decouple storage format from display format. Whether for just making code easier to read on screens of differing sizes (or for people with differing visual acuity) or finally getting us to the point where these decades-old debates over tabs vs. spaces and line length finally go away, I think this feature could make Atom really amazing:

https://discuss.atom.io/t/decoupling-display-format-from-storage-format/7245

If I'm understanding the approach correctly, I think this library is where these kinds of hooks would fit and I wanted to raise this idea while this subsystem is being designed/refactored.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.