Comments (15)
This would be really great to have. Saving some keystrokes in the long run :)
from radian.
@randy3k This is great. I really appreciate you doing that. I wanted to say though that my original idea was that when you TAB-ENTER
to autocomplete a function it would also provide the open and closing brackets for that function and place your cursor in-between those brackets. The console in Rstudio does this and I've posted a gif of what I mean below:
Currently, rice
will auto complete the function name but not provide the opening and closing brackets.
Thanks for your time, and I understand if that's a little bigger than intended.
from radian.
Hi Randy! It's been a few years and I love this tool you have created. I wanted to check in and see if there have been any changes to the codebase that would allow this functionality?
from radian.
I have the same issue as @dylanjm and it is a breaker for me as I am so used to using autocomplete at the RStudio console and having the brackets added automatically. Muscle memory!
from radian.
Do you mean pairing opening brackets and close brackets?
from radian.
Yes
from radian.
There is no such feature right now. It should not be hard to implement it in a similar fashion of the auto match feature of Rstudio. 😎 AFAIK, other repls such as julia and IPython also do not auto match brackets. It keeps me wonder why....
from radian.
I can see why developers might want to limit bracket matching, sometimes they can be a pain when you don't need a second bracket. Especially the case for quotations though.
from radian.
Ah, I understand why other repls do not support auto bracketing. It is mostly because a terminal, in general, cannot distinguish between typing and pasting. For example, copying and pasting foo(
may end up with foo()
unless the terminal supports bracketed paste mode and the user triggers BPM correctly. There are more bizarre situations when multiple lines are involved.
Yes, it is possible to support auto bracketing. But there are also use cases that auto bracketing becomes problematic.
from radian.
With that said, I have added a new setting rice.auto_match
with the default value set as FALSE
.
Check out the dev version and try.
from radian.
Oic, rice uses R internal completion system and the system tells nothing about what is being suggested, eg whether the suggestion is a variable or a function.
I am afraid that it is impossible by now unless we implement a new completion system, which won’t happen any time soon.
from radian.
ahhh I see, well great. Thanks for implementing the bracket auto-complete
from radian.
unfortunately, there were not many changes in the completion system to allow this.
from radian.
Great solution!!!
It works fine with these settings in VS code:
R version 4.2.3 (2023-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=es_ES.UTF-8 LC_NUMERIC=C
[3] LC_TIME=es_CL.UTF-8 LC_COLLATE=es_ES.UTF-8
[5] LC_MONETARY=es_CL.UTF-8 LC_MESSAGES=es_ES.UTF-8
[7] LC_PAPER=es_CL.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_CL.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
from radian.
is this supposed to work now? do I just have to update radian? :)
from radian.
Related Issues (20)
- Cannot handle `\b` correctly in version 0.6.10 HOT 4
- Unexpected Alt+Backspace behaviour on Mac HOT 2
- Feature request: optionally create and use local history file if it does not exist HOT 2
- radian fails to load package while base R works without a problem HOT 1
- ubuntu 23: radian fails to start HOT 2
- Colored text output not working HOT 1
- Syntax highlighting command outputs HOT 2
- Autocomplete not working in R interactive terminal HOT 2
- long string display HOT 1
- Radian console not starting (TypeError in PromptSession.prompt()) HOT 1
- [Feature Request] auto scroll during REPL HOT 1
- Windows code page detection HOT 2
- Search vs autocompletion
- cannot open the connectionwarning messages from top-level task callback 'vsc.workspace' HOT 1
- Autocomplition of `::` items does not work with help function: `?`
- Any ways to change the auto complete behavior?
- VS Code plotting using R interactive terminal crashes
- Can't switch R binary to a rig installed R version
- Problems with UTF-8 on Windows HOT 2
- Wrong characters displayed in prompt
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 radian.