Table of Contents Awesome Tips about Atom Series
Install Atom Editor Install Atom from here Install Shell Commands Go to Atom -> Install Shell Commands , this will install shell commands: atom and apm or atom-beta, apm-beta depended on we choose to install atom or atom-beta. Install Packages at Settings -> Packages Atom Editor Settings Core Settings Show/Hide files/folders ignored by .gitignore(un)check “Hide VCS Ignored Files” in Tree View package Make files/folders ignored by .gitignore searchable or not(un)check “Exclude VCS Ignored Paths” in Settings Atom -> Preference -> Editor -> Enable soft wrap Tune Package Configuration After install a new package, read its settings page to configure it, learn its Keybindings etc. Find the package in “Preference -> Packages” Command Palette Select Preserve Last Search
at Packages -> Command Palette
As we usually call same functions multiple times. Tree View Fuzzy Finder Select Preserve Last Search cmd-t or cmd-p open the file finder cmd-b open the list of open buffers cmd-shift-b open the list of Git modified and untracked files
AutoSave Whitespace package uncheck “Ensure Single Trailing Newline” option How To Explore and Learn Atom Functions Command Palette Find all commands from one package by starting with the package name: e.g. Type Change Case
to know all functions provided Use Cmd+Shift+?: Search -> Help
to find/explore/call command. After install the package, read its readme, and settings, change them if applied. When you want to figure out how to do xx, or want some features, change some settings, first figure out what package provides the function.By using Key Binding Resolver
which shows which package responds to your typing or shortcut. Functions Multiple cursors cmd++Shift+click
: add new cursorsFold Pending Pane Items Search shortcut at Settings -> Keybindings Shortcuts from vim-mode-plus New File under current folder when select the folder or a file in project panel: A Command+P Switch to File Command+Shift+P Command Palette Command+\ Toggle Tree View Command+Enter Replace all Ctrl+Shift+C Copy full path Cmd+Option++(-) Increase(decrease) active panel size Cmd+Ctrl+G Select all matching characters Shift+Ctrl+M Markdown Preview Cmd+R File symbol navigation Ctrl + g Go to Line Ctrl+m Go to Matching Bracket Cmd+Shift+t Bring up the list of corrections (with spell-check extension) Ctrl+Shift+left(or right) move tab to left(or right)
Shortcut for Moving/Selection Option+left(right) Move to beginning/end of word Option+Shift+left(right) Select to beginning/end of word Ctrl+A(E) Move to first character(end) of Line Ctrl+Shift+A(E) Select to first character(end) of line Cmd+up(down) Move to top(bottom) Shift+Cmd+up(down) Select to top(bottom)
Shortcut for Writing Cmd+k+u Convert to Upper Case Cmd+k+l Convert to Lower Case Ctrl+Shift+k Delete Line Ctrl+K Cut to End of Line
New Line Above Space and new line are important when we write with markdown and use Pandoc to convert it to HTML. So we need insert a new line above to fix the format issue: the default cmd-shift-enter
confits with maximize-panels:maxmize
To assign alt-enter
to newline-above
, add the following in keymap.cson: Atom Editor Keymap When Shortcut Doesn’t Work Example: Ctrl+e
doesn’t work: not go to end of line
Use Cmd+.
to open Key Binding Resolver
Type the shortcut, the Key Binding Resolver
will show what commands this keybinding resolves to, and which one wins In my case, Ctrl+e
conflicts with Emmet: expand abbreviation
To solve it, I can either uninstall Emmet(as I don’t really use it) or replace the shortcut with desired functionin the Key Binding Resolver
click and go to the keymap file and find the keymap definition Click the clipboard to copy the shortcut definition in Keybindings settings replace the function to unset! to remove it or change it to another function Change “Alt+1” to Toggle Tree-View By default, “Alt+1” in Linux would show the first tab which itself is not that useful as I often use “ctrl+p” to go to specific tab; “Alt+1” is to toggle(hide) the project view (in left side) in intellij, so I am often confused, and type “alt+1” to hide tree view by mistake. Solve the conflict between jumpy:toggle and markdown-preview-enhanced:run-code-chunk Moving in Atom Editor without Mouse or Trackpad ctrl+F2 list bookmarks cmd+F2 create bookmark cmd+R toggle file symbols
Tabs In command palette: Tabs: close other tabs, close tabs to left/right etc Pane: Move item left/right
(ctrl+shift+left/right) to move tab to the left/rightsingle-clicking a file will open it in pending state use this to open files that we don’t want to keep and avoid open too many files Cmd+Shift+F: project find
opens files in pending state.More Atom Editor Tips Open link in Atom Use Rename to move files Find previous: shift + enter in the search dialog Use Cmd+/ to comment: it know the right syntax for different language Click the file name at the bottom bar to copy the full path Use Settings -> Updates to update all extensions Reset to Factory Defaults : mv ~/.atom ~/.atom-backup
Find Replace with regex Add |
at the beginning (to fix markdown table)Search for ^(.*)$
and replace with |$1
find all links that doesn’t start with http in markdown: \]\([^h]
Only in Selection
Use minimatch and glob patterns “globstar” pattern (**) can be used to match arbitrarily many subdirectories: docs/**/*.md Exclude file types or paths: ! Search only java source (exclude test) code: **/src/main/**/*.java or *.java,!*Test.java(this also works in Eclipse) Hot to Print in Atom Editor apm Resources