Giter Club home page Giter Club logo

Comments (6)

Asc2011 avatar Asc2011 commented on September 23, 2024 1

sometimes it does not take much to make people happy 8=))

I'm exactly on this.. looks good. It relates to the field of package-to-package conflicts.
Same can be said for the bracket-matcher-issue, you mentioned.
Do you think double-insertions alike () make sense during overwrite-mode ? I'd rather say no, one bracket, the opening one would be enough for me. The second is just one keypress from being overtyped ?
What do you think ?

Regarding the bracket-matcher a quick&dirty-solution is to just let the first character pass. The 'problem' is, that in overtype-mode one typically wants to avoid changes to the surroundings. Example:

+item('Dashboard',     '0')(href='#dashboard')
+item('Profile',        0 )(href='#profile')

Obviously the zero in line-2 needs a pair of single-quotes . If one now selects the 0 and uses bracket-matcher to add the single-quotes, you end up like so :

+item('Dashboard',     '0')(href='#dashboard')
+item('Profile',       '0' )(href='#profile')

The right-side of things has shifted a bit to the right. I can't stop bracket-matcher from doing so. Since it has no idea, that in this case, it would be a good idea to overwrite, instead of doing an insert.
I can do smth. as long as no selection has been created before. Then there will be a Event, which i can identify and intercept - because it contains two characters. Therefore one can act upon this case. What i do now is, cancel the event and make use of the first character - the opening-something. When bracket-matcher sends (), i put a ( on the line and move on.
One could look if there is a term right next to the cursor that wants to be wrapped into brackets, quotes or you name it. The handling of such cases would naturally have to be different, compared to standard-mode/Insert-mode. And that's not really desirable.
Sadly, the same applies to some other strong-features of bracket-matcher. The removal of pairs/brackets will most likely, remove smth. and as a consequence slightly shift the surroundings. Fair enough, at least I can confirm that the go-to-matching-bracket-select actually does work.
Anyhow, your ideas on this issue are welcome.

greets, Andreas

from atom-overtype-mode.

l-cornelius-dol avatar l-cornelius-dol commented on September 23, 2024 1

I think that auto-insertion of closing symbols like quotes and brackets makes little sense in overtype mode, more or less by definition (personally I don't like and don't use this feature, finding it more hassle than help).

I don't think any real effort should be expended to support it -- if anything, just overtype the closing symbol and leave it there. Granted the user will then immediately overtype the closing symbol, but what else could they expect?

from atom-overtype-mode.

Asc2011 avatar Asc2011 commented on September 23, 2024

This is due to the fact that the auto-complete-package works on a atom.selection. That makes it hard to hook into the actual process of text-insertion.
I have a early working version. Needs some testing :

  • simple insertion works as overwrite. Expands lines as needed.
  • multi-cursor ditto.

Snippets might cause problems. Snippets can be inserted via auto-complete-plus. The tab-triggered- jumps inside snippets might cause glitches... needs investigation & tests

from atom-overtype-mode.

ferenczy avatar ferenczy commented on September 23, 2024

Nice, a reply after 3 years :)

I was just going to report the same issue. So does it mean it's not possible to fix it?

Also, the same issue happens when parentheses/quotes/apostrophes pairs are auto-completed.

from atom-overtype-mode.

l-cornelius-dol avatar l-cornelius-dol commented on September 23, 2024

Is there any timeline for these outstanding issues to be resolved and the Atom package repo updated?

from atom-overtype-mode.

Asc2011 avatar Asc2011 commented on September 23, 2024

@lawrence-dol
two 'monkey-patched'-issues need to be resolved, before I'd want to release it. But i'm quite busy right now.
I'd like to release at the end of may... we'll see.

from atom-overtype-mode.

Related Issues (17)

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.