Atom: Imitate 'Shift-Enter' keybinding of IntelliJ - intellij-idea

In IntelliJ IDEA, one of the more helpful commands I've found is 'Shift-Enter' - it effectively moves the cursor to the end of the line, and starts a new line, thus not affecting the text on the current line.
I'd like to re-create this in Atom, but I can't seem to figure out how one would go about doing so. It doesn't look like you can have multiple editor actions for a given key combination, and I'm not sure if I simply can't find the esoteric editor command I'm looking for.
How can I recreate the behavior of shift-enter in IntelliJ for Atom?

As it so happens, I stumbled across the shortcut: You can use cmd-enter to do the same action. I'm not sure what the underlying command is, but I hope this is helpful to other people!

You can recreate this behaviour by adding this to your keymap:
'atom-workspace atom-text-editor:not([mini])':
'shift-enter': 'editor:newline-below'

Detailed answer;
Freshly open atom editor
Open Keymap option
Copy this and paste this;
'atom-workspace atom-text-editor:not([mini])':
'shift-enter': 'editor:newline-below'
Click save and close the file
Press Shift and enter, Now you'll be able to form a new line below the line you currently in are regardless of the place you are typing in.

Related

Atom keyboard shortcut to change window focus not working

I have the following keymap.cson file to config my Atom editor:
'body':
'ctrl-shift-cmd-left': 'window:focus-pane-on-left'
Only when I run this command, the current text is selected. Which without the alt key held, would make sense as a highlighting command.
However, is I bind a key command which I think most likely doesn't have a competing action, say alt-cmd-;, it seems to be registered into the list of key commands in Settings/Keybindings, yet again no window focus is happening.
Edit:
I now realize that pane and not window may be the relevant term for what I want. Still, searching the Key Bindings for pane focus switching didn't yield anything obvious. Surely, there must be a simple way to select through files in the Project area while editing.
Although this answer doesn't match the title of the question, based on your edit I think that tree-view:toggle-focus is what you're looking for.
Please try using Ctrl + 0.
And, if you use Nuclide (related to React), please try disabling it to check the difference.

In a PyCharm debugging session, how to move the cursor to to current line that is being executed?

I'm new with PyCharm. In a debugging session, the current line that is being executed is highlighted. I may look around in the code and lost where I am. Is there a quick way to go to the current line that is being executed?
BTW, I added other JetBrains IDE tags it's because I think they may have similar shortcuts or similar way to solve the problem. You are freely to remove them if you think it's not proper.
Run | Show Execution Point
(The action has a keyboard shortcut which depends on the keymap that you're using; the shortcut is shown in the menu.)

Intellij IdeaVim change keys

I would really like to be able to use IdeaVIM but I am unable to figure out where I can set my custom vim key mappings. For example instead of using Esc I would like to use Ctrl-C and instead of using hjkl I like to use wasd.
I have all these already set in my .vimrc but IdeaVIM failed to load them. I can copy them over manually to whatever file is needed but there is no documentation on how to do this.
As of IdeaVim 0.35 (released 2014-05-15), key mappings in ~/.ideavimrc are supported. You can put source ~/.vimrc in that file if you want to include mappings from ~/.vimrc.
Release announcement
VIM-288
(Note: This question could probably be considered a duplicate of this other StackOverflow question.)
I've done this myself, and its pretty easy in IntelliJ 11. I know that in previous versions (9, maybe?) setting up keymap values is significantly different.
In IntelliJ 11 you can do the following:
Go to Settings
Select Keymap from the left menu
Search for Exit Insert Mode on the right side and associate whatever key you want to use, such as CTRL-C
If you like to have Vim plugin installed (I find it very handy for typing) and at the same time have Ctrl+C and Ctrl+V working for copy and paste actions, do the following:
In the IntelliJ Idea, click on File > Setting. On the left pane, expand Editor and click on Vim Emulation.
Here, under the Shortcut column, find Ctrl+C and change it's Handler (under Handler column) to IDE instead of Vim.
Repeat it for Ctrl+V as well and hit Apply and Ok.
Now, you should be able to use the keyboard shortcuts for copy and paste while keeping the Vim Emulator enabled.
IntelliJ 12.1:
Go to Settings
Select Keymap from the left menu
Find Escape under the Editor Actions section and add the Ctrl-C shortcut there. ("Escape" under the "IdeaVim" section didn't work for me)
Following the same steps, but replacing "Escape" with "Exit Insert Mode" only partially worked for me. It exited insert mode correctly but ignored the following keystroke. So typing Ctrl-C,j,j would exit insert but only go up one line instead of two.

aptana studio delete line

I'm testing out Aptana Studio to do some javascript development I want to know if there is a shortcut to delete a whole line. Or if there is a way to create some kind of macro to do it.
I am running windows, and I know that I can click Ctrl+Shift+Del but that doesn't actually do what I want it to do. In VS when you click Shift+Del it doesn't matter where the cursor is on the line it will delete the whole line.
To do the same in Aptana I need to:
Click Home to get me to the beginning of the line
Click Ctrl+Shift+Del to delete the content of the line
Click Ctrl+Shift+Del to delete the line
This may seem small, but I do this action all the time in VS and I've grown accustomed to it.
Anyone have any ideas to help me out?
I just figured it out:
It's quite simple: Ctrl+D
Also if you want to change the key binding you can
Go to menu Window -> Preferences
Go to General -> Keys
Find Command 'Delete Line' and then bind it to your desired key combo(like Shift+Delete)

Rename using suggested var name with resharper

I'm Using resharper 6 nighty builds and VB.net. I've a big medium project with multiple files that don't follow the code style conventions of my company.
I've configured resharper with my own convenctions and It suggest to me the right name for each variable (perfect!).
But I can't find any automagic way to make the current name to be replaced with the suggested name.
Are there any way to do it? If not ... did you know ane fearure of coderush Xpress to achieve it?
Thanks.
If you've configured ReSharper with your naming conventions, then it should show a warning (blue squiggly underline) under any identifiers that don't comply. If you put the text cursor on one of those misnamed identifiers, you should see a pyramid icon appear near the left margin. Then you can press Alt+Enter (or click the pyramid icon) to drop down a quick-fix menu. There should be an option in the menu to "Rename to '_myField'". Usually it's the first item in the list, so you can just press Enter again to do the rename.
If you want to do this on everything in a source file, you can use the ReSharper > Inspect > Next Issue in File command (or its keyboard shortcut -- F12 in the IDEA keymap) to move the cursor to the next warning in the file. Then, if it's another name warning, you can use Alt+Enter, Enter again to fix it.
Unfortunately, there isn't a way to automatically fix every instance of a warning at once (though it's been requested; please feel free to vote for RSRP-126551 in their issue tracker).