RStudio Comment shortcut (Ctrl+Shift+C) not working - rstudio

RStudio v. 1.4.1103
Trying to use keyboard shortcut to comment lines of code in R scripts and Notebook code chunks.
Ctrl+Shift+C has no effect on selected code lines.
Using the menu "Code", "Comment/Uncomment Lines" works as expected.
Checked keyboard shortcuts; "Tools", "Modify Keyboard Shortcuts..." and this shortcut appears to be set up properly. Tried "Reset..." in this dialog with out success.
This functionality was working as expected in a previous version of RStudio.

Related

VS Code for Mac - keyboard shortcut to comment a line no longer works

I'm using Visual Studio code on MacOS, version Version 1.25.0 and I'm working with HTML and CSS files.
The keyboard shortcut "CMD+/" doesn't comment out the current line. If I open the edit menu and select Toggle Line Comment, that works fine. I checked keyboard shortcuts and the keybinding for that command shows CMD+/. I tried to re-set it, but I couldn't re-add that keyboard shortcut.
Any ideas how to troubleshoot this problem?
I had the same problem
Use ⌘K ⌘C to comment a line
After commenting you need to add one more space then CMD+/

Is there R code for moving the focus to the RStudio console?

I am constantly typing into the edit window of RStudio after my code completes execution, when my intention is to provide some input in the console window. Is there R code that could be executed that would automatically move the focus to the console window of RStudio?
In RStudio, go to the menu: Tools > Global Settings. In Global Settings, choose "Code" on the left and check the box that says "Focus console after executing from source."
If you don't want to change this global option, these keyboard shortcuts can make switching between the console and editor in RStudio much faster:
Ctrl+1 moves focus to the source editor
Ctrl+2 moves focus to the console
In addition, Alt+Shift+k brings up a list of most keyboard shortcuts
If you not look for a shortcut but for code, RStudio has the following command
rstudioapi::executeCommand('activateConsole')
See also RStudio IDE Commands

Visual Studio Code shortcut to display autocomplete list before typing on macOS

I am trying to display all possible words after putting the cursor in certain place in the code.
The autocomplete list appears when I start writing/typing:
However, I would like to see all suggested words even before typing.
I tried command + space, however it was a system shortcut for Search in macOS:
Any thoughts?
In case you are a CJK user using Mac, Ctrl+Space will not work, since it is used to switch IMEs.
There is another keyboard shortcut for triggering suggestions:
Option+Esc (Mac)
Alt+Esc (Windows)
Also see this post.
VS code version: 1.41.1
I solved this problem using fn+control+space.
Hope it helps you.
"change input source" keyboard shortcut should be disabled
To disable it->
Go to system preferences -> keyboard -> input sources
add a new input source (choose ABC)
Go to shortcuts tab (inside of keyboard settings)
Click on input sources on the left
disable the "select previous input source" shortcut
restart your vs code and now ctrl+space will show quick suggestions.
You can use the following alternative keyboard shortcuts:
⌘+I (mentioned in the official VS Code documentation for "Trigger suggestion")
⌥+esc
fn+control+space
The shortcut for the "Trigger Suggest" command is ⌃Space (ctrl+space) — as mentioned in the comments.
Most default shortcuts can be found in the documentation, which will automatically show the correct keybindings for the system you're on. In other words, if you visit the page on a Mac, you'll see Mac keybindings.
Additionally, you can:
go to Code > Preferences > Keyboard Shortcuts (on a Mac) and search for keybindings based on the command you want to execute
open up "show all commands" (⇧⌘P on a Mac) and search for the command there, allowing you to either view the keybinding for that command, or simply navigate to it directly from the search
Of course you'd have to have some idea of what the command's name might be. And in this case, a search for "suggest" would suffice.
If you use too many keyboard layouts, maybe the MacOS shortcut might be active. You can disabled ^(Ctrl)+Space shortcuts for MacOS.
System Preferences>Keyboard>Shorcuts>Input Sources> Disable Select the previous input source.
You can use next shortcut for change input sources.Ctrl+Alt+Space
when I was set up 2 keyboards with different layouts, and it turn out it overrides the ^+Space behavior, so this is how fix it:
Go to system preferences -> Keyboard -> Keyboard shortcuts
Click on input sources
and disable the "select previous input source" shortcut

Rearrange Code shortcut in Resharper doesn't work in VS2015

When I try to use the shortcut for moving lines up/down (Ctrl+Alt+Shift+↑/↓), it highlights the code and shows the tooltip message "Use Up/Down to move text line" but nothing happens. If however I try the same command via the menu bar (Resharper > Edit > Rearrange Code > Move Up) it moves the selected lines as expected.
I used to use this feature all the time so I find this bug very annoying. Apparantly, others also experience this (see comments for Resharper move line up down not working) but I haven't been able to find a solution for it. Resetting keyboard layouts and reapplying VS keyboard schemes doesn't work.
Has anyone been able to resolve this issue?
[EDIT]
Reason of this is issue (when you are logging to machine with VS and Resharper via Remote Desktop) is that Ctrl-Alt-Left Arrow/Ctrl-Alt-Right Arrow combinations are not sent to your virtual machine
There are two workarounds:
My first soultion (change combination see below)
You can use AutoHotKey script as stated in thread:
https://superuser.com/questions/327866/remote-desktop-sending-ctrl-alt-left-arrow-ctrl-alt-right-arrow-to-the-remote-p
[/EDIT]
Reason is
duplication of the same hotkeys which could be found in 'Shortcut currently used by:' combobox
Fix is
I described process for _MoveRight shortcut - for other shortcuts it works the same
STEP 1 Check for conflicting changes
seeImage
go to Tool --> Options --> Keyboard
in field 'Show commands containing' find your command (moveright in example)
click in field 'Press shortcut keys' press ALT + RIGHT ARROW
in field Shortcut currently used by you will find conflicting shortcut -
Edit.CompleteWord...
STEP 2 Now we need to delete this shortcut
in field 'Show commands containing' write Edit.CompleteWord
you should see ALT + RIGHT ARROW shortcut in field 'Shortcuts for selected command
click Remove button
STEP 3 Now we need to add our shortcut to _MoveRight function
in field 'Show commands containing' find your command (moveright in example)
click in field 'Press shortcut keys' press ALT + RIGHT ARROW
click Assign

Hotkey for commenting ruby code in Aptana Studio 3 not Working with german keyboard

In Aptana Studio 3 (latest version and all previous versions of 3) I am not able to comment lines via keyboard shortcuts. I have a german keyboard layout.
The default shortcut is CTRL + /, but this doesn't work. Even setting the shortcut in Preferences/General/Keys doesn't work. The command is called Python Toggle Comment.
Using the Commands menu and use Source -> Comments -> Comment Line / Selection comments the lines correctly. In this menu I can also see the hotkey CTRL + / behind the menu entry.
It would increase the speed of writing and testing code, if I could use the hotkey. How can I achieve this?
You can try pulling down a copy of the Source ruble and edit the keybinding to one that works for you. Commands > Source > Edit this bundle. It'll try to do a git clone of the bundle into your "Documents/Aptana Rubles/source.ruble" folder. Then you can edit commands/toggle_comment.rb and change the binding to what works for you.

Resources