Comments (19)
Did you copy the lines one by one? Are you using something like Nvim-R to send those lines?
from radian.
Actually, it is myself added this feature https://github.com/randy3k/rice/blob/c5ea3ddb7182086bc63d6bf82f1cb2bb28db8d16/rice/keybinding.py#L58-L65
from radian.
Yes I am using Nvim-R to send the lines usually (where I first noticed this issue), but it also happens if you just copy the lines one by one.
from radian.
@jalvesaq and I had some discussions here jalvesaq/Nvim-R#227
He implemented an option
let R_source_args = "bracketed paste"
This option doesn't alter the behavior of \l
but that of \ss
and \ff
. This may not be exactly what you want (I didn't). You can check if you like it or not.
An temporary solution for rice is to add an option to control the auto indentation.
A more permanent solution is to write a function <Plug>RDSendSelectionBracketed
and bind \l
to it in the visual mode.
from radian.
I have a key bound to <Plug>RDSendLine
in normal mode and <Plug>REDSendSelection
in visual mode. The latter works fine, the former exhibits the behavior I described (as does copying the lines manually).
👍 on an option to control the indentation
from radian.
close by v0.0.14
from radian.
Setting options(rice.auto_indentation = FALSE)
seems to have no effect as far as I can tell, the behavior remains the same as before.
With rice versions 0.0.14 and 0.0.21.
from radian.
It seems that there is a bug in parsing rice settings. Will fix soon
from radian.
It is strange, 0.0.21 works for me. Could you check options("rice.auto_indentation")
in rice console?
from radian.
By the way, you need to set it up in .Rprofile
as it won't be loaded dynamically.
from radian.
See https://asciinema.org/a/7GbLlcLxhosnci1UjoKnmzfJ8 for what it is doing on my machine, this is just copy pasting into a rice terminal, without Nvim-R at all.
An additional issue that has appeared is rice seems to be stripping the trailing newline when pasting and I now have to explicitly hit enter to start a new line. Previous behavior retained the pasted newline, which is what I would prefer.
from radian.
let's keep this open.
from radian.
I understand what is going on now, rice.auto_indentation
now only disable the indentation after the braces. What you are experiencing is an automatic indentation based on the indentation of the previous line, and it was designed by prompt_toolkit. I guess I have to also turn that off.
from radian.
I can also reproduce stripping newline issue.
from radian.
The stripping newline issue has fixed 8349baf
from radian.
The indentation issue is fixed 1ce94df
from radian.
v0.0.23 should have addressed all these.
Btw, thank you for the feedbacks. They are extremely helpful.
from radian.
Thanks for your persistence, can confirm it is now fixed!
from radian.
Just want to let you know that Nvim-R now supports bracketed paste mode jalvesaq/Nvim-R#258 so you just need to put
let g:R_bracketed_paste = 1
and Nvim-R will send the R code with bracketed paste without worrying the auto indentation. In other words, with this settings, a user can enjoy the auto indentation in the console, while the code sends through Nvim-R will not trigger auto indentation (as well as auto matching quotes/ parens).
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.