GithubHelp home page GithubHelp logo

Comments (8)

randy3k avatar randy3k commented on July 20, 2024

that's strange...
my advise is not to use tabs anyway

from r-box.

mreq avatar mreq commented on July 20, 2024

I never do, just noticed that from a script which I've gotten in class.

from r-box.

randy3k avatar randy3k commented on July 20, 2024

I confirm this bug..

from r-box.

randy3k avatar randy3k commented on July 20, 2024

it is actually triggered by the terminal R completion. For instance, if you type "mu" and then "tab" in the terminal, it will give you "multipleClasses".
one possible fix is to change every \t to space unless it is a string.

from r-box.

mreq avatar mreq commented on July 20, 2024

How about we create a regexp which replaces non-line-leading tabs with spaces somewhere around https://github.com/randy3k/R-Box/blob/master/sendtext.py#L53? Something like

re.sub(r'(\w)\t+', r'\1 ', cmd)

from r-box.

randy3k avatar randy3k commented on July 20, 2024

A problem of this is that it also changes string

re.sub(r'(\w)\t+', r'\1 ', "\"a\t=\tb\"")

I am coming up with a regex which only match non-string "\t"..but it is hard...

from r-box.

mreq avatar mreq commented on July 20, 2024

Not as effective as regex, but iterating over the string might work.

from r-box.

randy3k avatar randy3k commented on July 20, 2024

may be, we can still use expandtabs of re.sub and forget about the string issue.
User handling strings should be using "\t" then an actually tab.

from r-box.

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.