Git Product home page Git Product logo

Comments (3)

gaksaray avatar gaksaray commented on May 29, 2024 1

I tried C (tab autocompletion of macros after first backtick). It works!

I couldn't figure out A.

About B (automatic local macro open/close matching). This is already implemented in jupyterlab_stata_highlight2 for Jupyter Lab. Maybe there is an easy way to extend the same behavior to Notebook interface?

from nbstata.

hugetim avatar hugetim commented on May 29, 2024

A. I think you should be able to disable quote matching in your Jupyter config, as a workaround for the worse part.

B. Configuring local macro open/close matching may be possible via an extension that tweaks CodeMirror (the code editor plugin used by Jupyter), but that would take some work to figure out.

C. Autocomplete in Jupyter is something a little different, properly speaking. That behavior, tab-autocompletion, is determined directly by the nbstata kernel code. And it already should provide the closing single-quote for you, as demonstrated by the test shown here:

completions_test_setup('local test_local "test value"')
test_eq(
    _complete("list `t", 7),
    ["test_local'"],
)

In other words, if you define such a local macro in a previous code cell and then, in a new code cell, start typing the following

list `t

and then hit the Tab key, it should fill in est_local' for you (or offer a dropdown if there are multiple possible completions).

from nbstata.

hugetim avatar hugetim commented on May 29, 2024

Related to #17

from nbstata.

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.