Atom Editor Scrolls When I Click On A Line of Code - scroll

recently when I have been using Atom Editor, when I click on a line of code the editor scrolls in so that the code that I clicked on is in the center of the window (if that makes sense). For example if I have 100 lines of code, if I click on the code in line 25, it will automatically put line 25 in the middle of my screen. I think the catalyst for it was when I opened up a second file and dragged it into a pane next to my other file, so that I was editing two files at once side by side. It makes it hard to navigate through my code. Is there a way to fix this?

Okay, I found the answer to my problem. I had downloaded a package named "Typewriter Scroll" that is supposed to emulate a typewriter. I disabled it and my code no longer scrolls when I click.

Related

How do I build an Xcode shortcut for frequently used code snippet? [duplicate]

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.

Reset perspective in R Studio?

I'm pretty new to R programming. I'm using R studio, and all of a sudden it's no longer showing the workspace, it's only showing the console.
This is what it is supposed to look like
And this is what mine looks like now.
In Eclipse, whenever the workspace gets out of wack, I can just reset the perspective and everything it back to normal. I can't figure out how to do that in R Studio.
The default layout seemed to disappear after I restarted my computer.
Go to View > Panes > Show all panes
Opening a script file should split the windows horizontaly. If that doesn't work, click on the icon on the top-right corner of the RStudio window showing to windows:
This should at least show the console and file panels.
To restore the side panels, move your cursor to the extreme right of the window, until the cross arrows cursor appears (), and drag it to the middle of the screen.
For all panes to be shown, go to View-> Panes and tick show all panes.
Otherwise, ctrl+Shift+Alt+0 also worked for me.
Thank you.
Can you try saving an image of your workspace? Below are a couple of links that might help.
Workspace link 1
Workspace link 2
My computer is set up already in such a way that it automatically loads up the previous workspace I decided to save. A more qualified person would be able to tell you how and why it retrieves the previous saved image instead of a blank one like yours.
I also just got stuck for some time with the vertical split of the panes malfunctioning. I was always stuck with just 2 out of 4 panes.
I'm a pretty confident RStudio user and I tried many things like 'show all panes', moving panes around, clicking the 'hide-window', 'enlarge-window' and 'double-window' icons.
In the end I realised that the panes that were minimized didn't actually have the bar with the title. Instead these we only lines of 1 pixel height.
The solution for me was to expand the bottom panes and then hover near the 1 pixel height line at the top. This changed the cursor into the hand-cursor, which allowed me to drag the top window down, and back into view with the other pane.

Multiple editor windows in Xcode

When coding in Xcode, I double-click a file in the "Groups and files" list, and it opens a new editor window. I have several of these open at once.
Until today.
Today, when I double-click a file in the list, it opens the file in the last editor window I was using, meaning I can only have one editor window up at any one time.
I guess I've switched some option somewhere by mistake. How do I get it back to the way I like it?
I'm using Xcode 3.2.5
In the top right of the editing window is an icon that says "grouped", perhaps you clicked on it by accident.
Click on it so it says "ungrouped", and you'll be back to opening multiple windows.
perhaps preferences>General>Open Counterpart in same Editor

VS2010 docks code windows in the wrong place

When I double click on an entry in my Error List or Find Results list in VS2010, it docks the newly opened source code file not in the large window where all my other source files go, but in the small narrow window at the bottom along with the error list etc.
How can I get it to put it up with the others by default?
If I double-click an item in Solution explorer it puts it in the right place
I got things back to normal by using the Window | Reset Window Layout menu option. I noticed that now the tabs for "Error List" "Output" "Pending Changes" etc were now at the bottom of their docked window rather than the top. I think I somehow or other must have created a second code window area and docked my error list window etc into that.
Incorrectly docked (tabs at the top):
Correctly docked (tabs at the bottom):
I too had this problem and now found the cause: if you move the bottom window pane a visual guide is shown on which you can dock them to various places. For the bottom two visual options are shown - one where the pane will be part of the upper pane and one were it will be placed below the upper pane. The second choice gives a proper behavior wereas the first one gives you the tab titles at the top and doesn't work.
I think this is very annoying because it happens from time to time that I accidentally drag the pane. (I'm using a tablet) Probably this dragging is the cause for the trouble.
I was having the same issue but, for a number of reasons, didnt want to reset all my settings.
I draged all the open windows from the bottom panel area so they were floating, closed the find results window, redocked the error and output windows, then did a search (find in files) and the new floating window popped up, I then docked this to the same area that errors and output were in and when I double clicked on a file in the results window it opened in the right place.
I hope this works for you to and anyone else experiencing this issue...
I couldn't find the Window -> Reset Window Layout option. The above answers helped me understand, the problem was with me having moved around my windows. What finally helped me was the little symbols on the top right corner of the find results window. Instead of the usual 'Inverted triangle'+'Pushpin'+'x' symbols, what I saw was just the Inverted Triangle, which meant I docked the find results window in the main file docking area. So, when I moved it to the bottom docking area in Visual studio, it worked for me.

How to make Visual Studio editor stop scrolling past bottom of a file?

In the Visual Studio editor when you pull the scroll bar down to the bottom of the file, all you see is a blank page, since the text has scrolled up past the top of the text editor window. This makes scrolling to the bottom difficult because you can't just pull the scroll bar quickly all the way down but have to carefully position the cursor so you can still see your code.
How can I make it so that, as in NotePad, when I pull the scroll bar down to the bottom of the file, I see the bottom of the file?
There is a configuration option provided in VSCode for the functionality you specified. To enable it, go to File -> Preferences -> user settings
On the right side of the editor in settings.json paste the below line at the bottom (before closing bracket), save and close.
"editor.scrollBeyondLastLine": false
This will prevent the editor from scrolling beyond the last line.
Inside of VS Code, Press command+,, and search for "Scroll Beyond Last Line" and untick it
If you are willing to use the keyboard instead, pressing Ctrl+End will achieve what you want.

Resources