天天看点

atom java shortcut key

beauty code: control + option + b

Command and shortcut reference

Command macOS Linux/Windows Notes
Script: Run cmd-i shift-ctrl-b If text is selected a "Selection Based" is used instead of a "File Based" run
Script: Run by Line Number shift-cmd-j shift-ctrl-j If text is selected the line number will be the last
Script: Run Options shift-cmd-i shift-ctrl-alt-o Runs the selection or whole file with the given options
Script: Run with profile shift-cmd-k shift-ctrl-alt-b Runs the selection or whole file with the specified profile
Script: Close View esc or ctrl-w esc Closes the script view window
Script: Kill Process ctrl-c ctrl-q Kills the current script process

Basic Manipulation

There are a handful of cool keybindings for basic text manipulation that might come in handy. These range from moving around lines of text and duplicating lines to changing the case.

  • Cmd+J - Join the next line to the end of the current line
  • Cmd+Ctrl+Up/Down - Move the current line up or down
  • Cmd+Shift+D - Duplicate the current line
  • Cmd+K Cmd+U - Upper case the current word
  • Cmd+K Cmd+L - Lower case the current word
  • Ctrl+T - Transpose characters. This swaps the two characters on either side of the cursor.

Atom also has built in functionality to re-flow a paragraph to hard-wrap at a given maximum line length. You can format the current selection to have lines no longer than 80 (or whatever number 

editor.preferredLineLength

 is set to) characters using Alt+Cmd+Q. If nothing is selected, the current paragraph will be reflowed.

Deleting and Cutting

You can also delete or cut text out of your buffer with some shortcuts. Be ruthless.

  • Ctrl+Shift+K - Delete current line
  • Alt+Backspace or Alt+H - Delete to beginning of word
  • Alt+Delete or Alt+D - Delete to end of word --- does not work in mac, use ctrl-alt-d work
  • Cmd+Delete - Delete to end of line -- does not work in mac
  • Ctrl+K - Cut to end of line -- work
  • Cmd+Backspace - Delete to beginning of line

ps: 1. google-java-format(Reformats Java source code to comply with Google Java Style.).

2. After install google-java-fromat package, java code automatically format when you save code. 

3. Java (ide-java): The Atom team built on the language servers foundation laid by the Eclipse foundation and Red Hat to create the Java package. You will need a Java 8 runtime installed to get going but then can enjoy much richer editor facilities.

references:

1. https://github.com/rgbkrk/atom-script#command-and-shortcut-reference

2. https://github.com/google/google-java-format

3. https://google.github.io/styleguide/javaguide.html

4. https://blog.atom.io/2017/09/12/announcing-atom-ide.html

5. https://flight-manual.atom.io/using-atom/sections/editing-and-deleting-text/

for better productivity see Bash Shortcuts For Maximum Productivity. You need to be based on your operating system. This means you need to test these keyshort yourself.

ide