Split Screen in Atom Editor - atom-editor

Is there a way (plugin or something) to use split screen in the Atom Editor?
I've looked inside the menus, but I can't find any related options.

Using the command palette
Open the command palette with cmd + shift + p (OSX) or ctrl + shift + p (Linux/Windows) and type "split". You'll see options for Up, Down, Left, and Right split.
Using keyboard shortcuts
Split the current tab in a direction with the following shortcuts
Up       cmd / ctrl + k then ↑
Down  cmd / ctrl + k then ↓
Left     cmd / ctrl + k then ←
Right   cmd / ctrl + k then →
You can close an active split pane with cmd / ctrl + k then cmd / ctrl + w.
Move between panes
If you want to move between open panes (with the keyboard) you have to modify your keymap file. Go to Atom -> Open Your Keymap and include this:
'body':
'cmd-alt left': 'window:focus-pane-on-left'
'cmd-alt right': 'window:focus-pane-on-right'
'cmd-alt up': 'window:focus-pane-above'
'cmd-alt down': 'window:focus-pane-below'
'cmd-alt-2': 'pane:split-right'
'cmd-alt-3': 'pane:split-down'
This is my personal setup. I was used to Sublime's default cmd + alt + arrow. Change the left side commands to your personal preference.
Note
You need to press cmd-alt once, release, and then press the arrow button. Otherwise it won't work.

I found this at Split Windows - issue #64:
It seems like Atom already has support for splitting windows (cmd-k + arrow key)

Right click anywhere on an open file, select "split left"
If it duplicates a file, "x" it out.
Result:

I have created a beginners cheat sheet for Atom that lists some introductory notes and keyboard shortcut commands etc. Its on github #
https://github.com/pd-gmit/atom-cheatsheet/blob/master/atom_cheatsheet.md

You could always just right click anywhere on the file and the split options are available in the context menu.

Related

setting Ctrl+L for selecting line in VS Code Jupyter notebook

I'm using VS code for a while and I get used to Ctrl + L shortcut to select a line in VS Code. but this shortcut doesn't work in VS Code Jupyter notebooks! how can I add this shortcut?
File > Preferences > Keyboard Shortcuts
Then search 'Ctrl + L' , right-click the unwanted item, and select remove keybinding

Jupyter Multi-line Cursor with Mac

Does anyone know if this is possible to do on a mac?
http://swanintelligence.com/multi-cursor-in-jupyter.html
It looks like they are highlighting the entire text block and then getting multi-line cursors. I try doing this with option + mouse selection and then cmd + mouse click but it doesn't work.
this is pretty cool. here's how I did it
option(alt) + mouse selection
then, instead of cmd + click try cmd + "right key"
this should multi-select all the ending rows
*option(alt) + "right key" instead of cmd + click seems to work as well, along with cmd + "right key"

Is there a shortcut for deleting a line in Jupyter's edit mode?

In Jupyter's edit mode, is there a shortcut for deleting a line of text? Something like Ctrl + L in Visual Studio?
Shift + Delete or Ctrl + D or both, depending on version.
Ctrl + D is listed under Help → Keyboard Shortcuts in the notebook menu, but Shift + Delete seems to work despite being undocumented.
As for Jupyter notebook servion version 6.0.2 the command Ctrl + D works for me. This shortcut is listed in the shortcut documentation, that can be found under Help → Keyboard Shortcuts.
If you want to edit the shortcuts you can do this here: Help → Edit Keyboard Shortcuts
On Mac, use Cmd + D, instead of Ctrl + D.

Commenting out code blocks in Atom

I have been moving from Webstorm and RubyMine to Atom and I really miss a feature from the Jetbrains editors where you select a code block and press CMD + - and it adds language specific comment character(s) to the beginning of each line. (# for ruby. // for js, /* for css etc.).
Is there a built in shortcut for Atom or a package which provides this feature?
According to this, cmd + / should do it.
And for Windows and Linux, it is ctrl + /.
Atom does not have a specific comment-block function, but if you select more rows and then use the normal ctrl-/ (Windows or Linux) cmd-/ (Mac), it will comment all the lines.
Command + / or Ctrl + shift + 7 doesn't work for me (debian + colombian keyboard).
In my case I changed the Atom keymap.cson file adding the following:
'.editor':
'ctrl-7': 'editor:toggle-line-comments'
and now it works!
Also, there are packages:
Comment package for atom (https://atom.io/packages/comment)
Block-comment-lines https://atom.io/packages/block-comment-lines
Sublime Block Comments
Pressing (Cmd + /) will create a single line comment. i.e. // Single line comment
Type (/** and press the Tab key) to create a block comment ala
/**
* Comment block
*/
with all my respect with the comments above, no need to use a package :
1) click on Atom
1.2) then ATL => the menu bar appear
1.3) File > Settings => settings appear
1.4) Keybindings > Search keybinding input => fill "comment"
1.5) you will see :
if you want to change the configuration, you just have to parameter your keymap file
You can use Ctrl + /. This works for me.
Multi-line comment can be made by selecting the lines and by pressing Ctrl+/ .
and Now you can have many plugins for comments
1) comment - https://atom.io/packages/comment
2) block-comment-lines - https://atom.io/packages/block-comment-lines
better one is block-comment try that..
Edit your keymap.cson file and add
Windows
'.platform-win32 .editor':
'ctrl-/': 'editor:toggle-line-comments'
Mac
'.platform-darwin .editor':
'cmd-/': 'editor:toggle-line-comments'
Now just highlight the text you want to comment and hit the keybinding.
You can use Ctrl + Shift + / for Windows.
Atom does not have block comment by default, so I would recommend searching for atom packages by "block comment" and install the one suits to you.
I prefer https://atom.io/packages/block-comment because is has the closest keyboard shortcut to line comment and it works as i need it to, meaning it would not comment the whole line but only the selected text.
line comment: CTRL+/
block comment: CTRL+SHIFT+/ (with the plugin installed)
Possible reason: watch out for overlapping keybindings. It has happened in my case and deactivated the initial toggle line comment binding:
The Keybindings you can find in the Edit -> Preferences -> Keybindings of the application navbar.
The solution was overriding binding for github:toggle-patch-selection-mode
On an belgium keyboard asserted on the mac
command + shift + / is the keystroke for commenting out a block.
CTRL+/ on windows, no need to select whole line, Just use key combination on line which you want to comment out.
first select your block of code then
press cmd + / for MacOS

Does Xcode 4 have keyboard shortcuts for Replace & Find Next / Previous?

Does XCode 4 have keyboard shortcut for the two menu options: Edit > Find > Replace and Find Next / Previous?
If not, (1) why not, (2) how do I create them, and (3) which key combinations do you recommend for the shortcuts?
As for Find & Replace, they are provided by default now (version 4.2.1):
Find & Replace: Cmd + Option + F
Find & Replace in Workspace: Cmd + Option + Shift + F
As for Find next/Find previous, you should be able to use standard Cmd-G and Cmd-Shift-G Mac shortcuts.
But the keyboard shortcut for Edit > Find > Replace doesn't seem to be provided by default. However, you can set up one if you go to XCode 4 Preferences (Cmd-,) and then click Key Bindings. There are options available for Replace, Replace All as well as Replace and Find Next.
You can do that by
Find & Replace: Cmd + Option + F
Find & Replace(in Workspace): Cmd + Option + Shift + F.
Also you can change this control as per your preference by following these steps:
1. Xcode > Preferences
2. Select Key Bindings
3. Search for command you want to replace and then add a suitable combination.
Refer to the attached Image.
Hope it helps. All the best

Resources