Coder Social home page Coder Social logo

Comments (1)

Atomesh avatar Atomesh commented on September 26, 2024

I found the reason, if key not text character, it will not be trigger.
In run_snippets.ts line 45

		if (snippet.options.automatic || snippet.type === "visual") {
			// If the key pressed wasn't a text character, continue
			if (!(key.length === 1)) continue;

			effectiveLine += key;
		}

For those who need it, you can comment out this section in the source code to enable triggering actions with keys like Enter and Backspace, fulfilling specific requirements. Note that in the trigger, 'Enter' should be used as the trigger value instead of '\n', as this could lead to many unexpected behaviors,like cursor position. This method should only be used as a hack.

I suspect the reason for the misplaced position lies within the computeTabstops method, but I'm struggling to comprehend this code snippet.

A feasible improvement could be to introduce a new mode specifically for handling non-text characters' input to avoid conflicts. However, since this would be a feature request, I'll go ahead and close this issue.

If there are any plugins or methods for overriding input, please kindly let me know. I would be extremely grateful.

from obsidian-latex-suite.

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.