Code Monkey home page Code Monkey logo

Comments (10)

ivlis avatar ivlis commented on July 29, 2024

+1 for this

from atom-latextools.

PaulEcoffet avatar PaulEcoffet commented on July 29, 2024

I had a similar issue and it was because I had also installed latex-friend which has a similar feature. It seems that there is a conflict between the two. I uninstalled latex-friend and everything works perfectly now.

from atom-latextools.

msiniscalchi avatar msiniscalchi commented on July 29, 2024

The trigger-happy behavior is in part due to some internal atom limitations, though it can be ameliorated.

As for focus not returning to the editor, I am seeing this too. @ig0774 any ideas? It's not consistent, which makes this harder to debug.

from atom-latextools.

ig0774 avatar ig0774 commented on July 29, 2024

On the focus issue, I think this should've been resolved by #78, but if you're seeing it with those changes, I can try to dig a bit more.

from atom-latextools.

msiniscalchi avatar msiniscalchi commented on July 29, 2024

Actually, no. I've pulled #78 into master and have been using it for the past few days (yay dogfooding!). It is very weird. What I can see is this:

(1) if you disable auto-triggering, then there is never a problem with the keybinding (C-l,x).
(2) if you enable auto-triggering, the very first time you type e.g. \ref{, you lose focus. Subsequent invocations seem to be a bit random---with \ref{ things seem to work if you actually select a label, though you may lose focus if you "esc out"; with \cite, I seem to lose focus more often
(3) there is also some weird interaction with the undo stack, as @tomrijndorp reported. If I enter a reference and CMD-z my way back to the original state of the file, I still see a blue dot in the corresponding tab. This btw happens both with and without auto-triggering.

from atom-latextools.

ig0774 avatar ig0774 commented on July 29, 2024

One possibility I can think of is that we may not actually be storing a reference to the TextEditor, since its actually storing document.activeElement. Could you try changing line 233 of ltselect-list-view.coffee to this:

    @previouslyFocusedElement = atom.views.getView(atom.workspace.getActiveTextEditor())

That should ensure we try to reset focus on the text editor. If that works, we could pass the triggering text editor via start(), which may result in better behaviour.

from atom-latextools.

ivlis avatar ivlis commented on July 29, 2024

@ig0774 Why not just to use the autocomplete+ for this?

from atom-latextools.

msiniscalchi avatar msiniscalchi commented on July 29, 2024

@ig0774 yes, that seems to work!

It's a bit weird, because the problem happens in 0.8.0 as well (per @tomrijndorp), where we still use space-pen-views... anyway, that seems to fix the problem, so that's great. Would you be able to whip up a PR for this?

@ivlis autocomplete+ is not smart enough for our purposes. More precisely: it may be OK for references, but with bibliographies, I think showing more info is better---but that requires a panel, rather than a pop-up.

from atom-latextools.

ig0774 avatar ig0774 commented on July 29, 2024

Well, #78 was an attempt to be a really careful port of the space-pen stuff. I didn't want to introduce new behaviour (after the pain of the last ST release). I think the space-pen stuff had that behaviour because they couldn't always rely on there being an active text editor (e.g. with the command palette).

from atom-latextools.

msiniscalchi avatar msiniscalchi commented on July 29, 2024

I just pulled #88 into master, and it does solve the focus issue. Thanks @ig0774 !

I've also pushed a small change that should fix the trigger-happy autocomplete issue for citation commands. Hopefully I'll be able to tag a new release this afternoon.

from atom-latextools.

Related Issues (20)

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.