In linux I frequently highlight text with the mouse to copy, and middle click somewhere else to paste. In RStudio, this does not work, forcing the use of Ctrl+C and Ctrl+V or right-click menus. I often want to quickly copy segments of text between the console, editor, and browsers. Is there a way to get highlight+middleclick working?
This problem has been noted by the RStudio developers and added to their list. Unfortunately, that was five years ago, so don't hold your breath...
There are a lot of alternatives to RStudio. I haven't tried them all but RKward supports middle clicks.
Related
When previewing a file by clicking on it once in VSCode, is it possible to preview other files in the explorer by using the arrow keys, similar to Visual Studio? When I do it, it just selects the file, but doesn't preview it (unless I use my mouse). I'd provide a picture, but the upload isn't working right now, sadly. :(
I feel like that used to be a thing and I broke it at some point, but I could also just imagine it due to VS.
https://stackoverflow.com/a/66237216/12903844 has exactly what I was looking for!
Short summary: Up/Down + Space will enable you to preview a file, but you can also use 'multi-command' to macro it to just Up/Down (without having to press Space when selecting files this way).
Credit goes to Mark for answering it in the comments, just adding it here so the solution is marked. <3
When I follow all the instructions (including apple's video) to drag text to create a code snippet in xcode, I get a different system behavior: all I see is the selection ibeam... I can't drag. It just ends up selecting text again. Am i missing some obvious Apple-ism?
Thanks
Yes, I ran into the same problem, and Apple-ism seems to be a good term for this issue :)
It works this way:
Select (or highlight) the code your want to turn into a snippet
EDIT: Click and hold (do not drag!) on any part of the selected text for a short moment (like 2 seconds, sometimes 8 seconds)
EDIT: The mouse cursor will change icon (not on El Capitan).
Now you can drag the code over the snippets library, where a green + icon will appear. EDIT: On El Capitan the green icon does not appear, but the frame of the code snippets window will become thinner.
This happened to me as well. The given solution didn't work but still needed to create snippets.
This is a workaround although not the best option, it works.
From Xcode, select the snippet window, and leave it selected.
Open a text editor app.
From Xcode, select and copy the code you want to use to create your snippet.
Paste it into your text editor and then select all of it.
Now drag&drop normally from the text editor into the snippets window in Xcode.
As said, not the best option but it works.
(Note for Xcode 8.1) Sometimes selecting the text and maintain the mouse button clicked for 3..8 seconds the cursor turns into an arrow and it's possible to D&D. Too bad it only works sometimes...
On High Sierra 10.13.3 and XCode 9 I faced the same problem. The decision that works for me is selecting code on a blank space before the first symbol and then dragging it to the snippets library.
Important: you need to drag only from the blank space (look at the screenshot below). Otherwise you will reselect your code again.
The cursor changes only when you start dragging, so don't be confused and don't wait until it changes.
I've run into this problem with Xcode 7.2 on Mac OS X 10.11.2 (El Capitan). Click and hold on the selection and the cursor never changes from the I-beam to the arrow for dragging.
Although MLBDG's answer is a usable workaround, I found that quitting and restarting Xcode fixed the problem. This might not work for everyone, but it's worth a try if you're having difficulty.
just highlight your text
copy in filter text field that u can see on your bottom of snippet library
paste the text
now select the text and drag from there to snippet library
The answer is really !undisobvious. You need to select a chunk of text. Then click on actual text characters, but without moving the mouse. Only then will the gods of XCode bequeath unto you a draggable snippet of code to do with as you please. Should you dare to miss the text and click in empty but selected space, the demons of XCode will strike down your selection and make you start from scratch. The unfortunate will not even realise this feature actually exists.
Hold option to duplicate it. For instance to make a duplicate case statement without destroying your copy buffer, then replace the case you cleverly have ready to paste during your search.
As a UI designer it is not obvious to me why this has such an unreliable twitchy implementation.
I am just install Octave 4.2.0 in Windows 10 and try to do some Machine Learning exercises. I notice that I can't paste the normal clipboard content to the Octave.
Does anyone else have this issue? If so, any work around? Or is it just bug in the program?
Although your description doesn't indicate the exact place you're trying to paste contents into, there were a couple bugs around the time of Octave 4.2 specifically related to this problem. See:
bug #51095: editor doesnt allow paste of exisiting clipboard data
and
bug #52361: Ctrl-C/Ctrl-V only works reliably if executed as very first action
both bugs have since been patched and closed (around version 4.4), and reports seem to indicate that the problem has not resurfaced in later versions. Anyone experiencing similar issues in a recent version of Octave (v5.2.1 as of today) should either comment on one of those closed bug reports or create a new one at https://bugs.octave.org
Run >> preferences, and in the Shortcuts tab, untick the option at the top "Disable global shortcuts when Command Window has focus". (I don't know since what version it is there.)
If you disable global shortcuts, Ctrl-V (for paste) is disabled because it is a Windows thing.
If you do not disable them, Ctrl-V will work. So will Ctrl-C to copy text, but it will also still work to abort an execution.
If you click on the icon in the title bar on the top left corner of the
window, you'll get an edit option, and you can choose to mark (choose
the text to copy), copy, and paste from there.
In Eclipse, I am able to do Ctrl+M while I am typing in the editor to full-screen the editor and temporarily hide all the side-windows. Is there a way to achieve this in RStudio? The code editor portion of the window is very small and yet I don't feel like manually fiddling with the mouse to resize my console/plots/workspace windows.
The view menu doesn't offer much else than zooming in/out.
All shortcuts Alt+Shift+K
You can make the editor fill up the entire rstudio window with Ctrl+Shift+1. Also to restore.
To move between the panes, the shortcut is CTRL + number.
1 - source
2 - console
Adding shift to the shortcut makes that pane fill up the spaces.
The best solution I've found is to use a "source window", i.e. pop out the editor into a separate window temporarily:
This window can then be expanded to fill the whole screen:
Only way I know how is to click on the right hand side of the title bar of the source code section where it has 2 windows symbols. The right-most one expands the code window to the entire left hand side.
Instructions and documentation below from the R studio manual:
http://www.rstudio.com/ide/docs/using/console
If you're running on Linux, you can install RStudio Server, just for use on the same computer. It's almost exactly like the regular RStudio, but inside a browser. I prefer it because I can full screen, and can use the browser's Find in the console.
I want to be able to move the cursor (not move the line of code) in the text editor up a block or down a block by pressing <ctrl>+<uparrow> or <ctrl>+<downarrow>. In jEdit, Leafpad, etc, this just works out of the box. I do not want to move an entire page at a time, just simply go to the start or end of the text block that I happen to be on.
Specifically, I want this, but for VS 2012 (which no longer has macros):
keyboard shortcut to move from one code block to another in VS2008
I've seen these posts, and they are not what I'm after; I do not want to move code, I want to move the cursor to the top or bottom of the block I happen to be on.
Visual Studio: hotkeys to move line up/down and move through recent changes
Visual Studio - Scroll AND move cursor
I have checked in ReSharper as well, and cannot seem to find an answer there.
Does anyone know of an add-in that provides this functionality?
Bind them to Edit.PreviousMethod and Edit.NextMethod in the Options->Environment->Keyboard?
I removed everything that was bound to these shortcuts, then bound it to Edit.PreviousMethod and Edit.NextMethod. This put the focus on the method box in the editor, but then you have to press enter to get it to navigate to that method.
The best I could find was using ReSharper, which I was trying to avoid. However, I'm a minimalist and ReSharper got in my way, I was leaving it toggled off almost all the time, so I uninstalled it.
I believe it was ReSharper.MoveToNextMethod or .NavigateToNextMethod, but I have uninstalled it so I'm going on memory. Using it, it would jump to the beginning of the previous or next method, which was not quite what I was looking for, but better than nothing.
Edit: I gave up. I moved to .Net Core for c# code and do all my editing outside of Code, using text editors that employ common keyboard shortcuts like Geany, jEdit, etc.