Comments (10)
+1 for this
from atom-latextools.
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.
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.
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.
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.
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.
@ig0774 Why not just to use the autocomplete+ for this?
from atom-latextools.
@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.
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.
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)
- Citation autocompletion triggers focus stealing bug.
- -shell-escape is not properly passed HOT 5
- Uncaught TypeError: Cannot read property 'nextElementSibling' of null
- Sumatra PDF viewer cannot be invoked HOT 3
- Expand Abbreviation
- Arch/Manjaro Linux: Issues with xelatex HOT 2
- Extra backslash in autocomplete
- Uncaught TypeError: Cannot read property 'length' of undefined
- Support for \(...\) to wrap math expression
- Uncaught Error: ENOENT: no such file or directory, open 'D:/main.tex' HOT 1
- Cite auto trigger - bibliography inside class file
- Uncaught TypeError: Cannot create property 'reversed' on string '' HOT 12
- when triggered \ref{ or \cite{ it thinks that PATH in \input{PATH} is relative
- atom-latextools package abandoned?
- Uncaught TypeError: Cannot read property 'insertSnippet' of null
- Uncaught Error: ENOENT: no such file or directory, open '~/Learning/Astronomy 夊ćĺŚ/Astronomy_Today...
- Hotkey change error HOT 1
- Double dollar sign
- RAM/swap usage increasing as compiling
- Latex log
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-latextools.