rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.58k stars 1.08k forks source link

Cutting the current line without selecting with CTRL+X #14694

Open Paveljolak opened 2 weeks ago

Paveljolak commented 2 weeks ago

I am new to RStudio as we are using it for one of my CS courses that I have. As many different editors that I had used I tried cutting a full line without selecting it with CTRL+X. And nothing happend, I had to manually select the full line and then cut it. I tried looking for a solution or if the shortcut exists. I only found some issues already closed due to being "stale" or "inactive", but I don't think this feature exists.

It would be amazing if this feature could be added to RStudio, as it would make writing and editing in it much more faster and enjoyable.

ronblum commented 2 weeks ago

@Paveljolak Thank you for the suggestion! I'm not sure that I understand: Are you looking to be able to place the cursor in a line and then cut the entire line with Ctrl-X without selecting the line?

gtritchie commented 2 weeks ago

This is a shortcut found in Visual Studio Code. Ctrl+X (Cmd+X on Mac) cuts the entire line if there is no selection.

Paveljolak commented 2 weeks ago

@Paveljolak Thank you for the suggestion! I'm not sure that I understand: Are you looking to be able to place the cursor in a line and then cut the entire line with Ctrl-X without selecting the line?

Yes, exactly that.

This is a shortcut found in Visual Studio Code. Ctrl+X (Cmd+X on Mac) cuts the entire line if there is no selection.

Exactly as specified in this comment.