https://github.com/atom/bracket-matcher
Use ctrl-m to jump to the bracket matching the one adjacent to the cursor. It jumps to the nearest enclosing bracket when there's no adjacent bracket,
Use ctrl-cmd-m to select all the text inside the current brackets.
Use alt-cmd-. to close the current XML/HTML tag.
https://flight-manual.atom.io/using-atom/sections/moving-in-atom/- Alt+Left or Alt+BCtrl+Left - Move to the beginning of word
- Alt+Right or Alt+FCtrl+Right - Move to the end of word
- Cmd+Left or Ctrl+AHome - Move to the first character of the current line
- Cmd+Right or Ctrl+EEnd - Move to the end of the line
- Cmd+UpCtrl+Home - Move to the top of the file
- Cmd+DownCtrl+End - Move to the bottom of the file
You can also move directly to a specific line (and column) number with Ctrl+G. This will bring up a dialog that asks which line you would like to jump to. You can also use the
row:column
syntax to jump to a character in that line as well.
I found that Atom has a native keybinding set for this under as:
https://flight-manual.atom.io/using-atom/sections/snippets/
Multi-line Snippet Body
You can also use CoffeeScript multi-line syntax using
https://discuss.atom.io/t/create-multi-line-snippet/3446/2"""
for larger templates:'.source.scss': 'Comment': 'prefix': 'cmnt' 'body': """ /*------------------------------------* ::$1 \*------------------------------------*/ $2 """
Atom stores unsaved files in its IndexedDB 620. If the changes didn’t come back when you reopened Atom with the same project folder, they’re probably goneFuzzy Finder
- Select Preserve Last Search
it's a command palette package setting,Preserve Last Search
06. Reach content fast
For very long documents, you can create something called a bookmark with cmd+F2. This will place a special icon in the gutter, and if you hit ctrl+F2 you’ll open up a dialog box where you can see a list and search through your bookmarks quickly. F2 will move you forwards through your bookmarks and shift+F2 backwards.Another great way to navigate is to use symbols by using cmd+R. Atom will analyse the current document and build you a quick outline based on its contents.08. Master multiple cursors
cmd+click will let you add new cursors anywhere. My favourite way to create new cursors when I need to choose something at the same position above or below the current cursor is ctrl+shift+up/down. Be careful, because those might already be taken over by mission control on a Mac, so may have to use custom keybindings.atom.commands.add 'atom-workpace', 'me:personalize-whitespace', -> view = atom.views.getView(atom.workspace.getActiveTextEditor()) atom.commands.dispatch(view, 'whitespace:convert-all-tabs-to-spaces') .then () -> atom.commands.dispatch(view, 'whitespace:remove-trailing-whitespace') .then () -> atom.commands.dispatch(view, 'line-ending-selector:convert-to-LF')
Auto Reveal Tree-view
cmd-\
to open/close the tree view,ctrl-0
to focus it- a, shift-a, m, or delete to add, move or delete files and folders
- Find Tree-view package, select “Auto Reveal”
- up/down arrow keys to preview files
- need reload the window
Make 'preview files' to work with up/down arrow keysatom.commands.add '.tree-view', 'custom:expand-item-down': -> fs = require 'fs' item = atom.workspace.getActivePaneItem() atom.commands.dispatch(item.element, 'core:move-down') if fs.lstatSync(item.selectedPath).isDirectory() return else item.openSelectedEntry(pending: true, activatePane: false) return atom.commands.add '.tree-view', 'custom:expand-item-up': -> fs = require 'fs' item = atom.workspace.getActivePaneItem() atom.commands.dispatch(item.element, 'core:move-up') if fs.lstatSync(item.selectedPath).isDirectory() return else item.openSelectedEntry(pending: true, activatePane: false) return'.tree-view': 'down': 'custom:expand-item-down', 'up': 'custom:expand-item-up'And if you go intoSettings -> Keybindings
and search for “window:focus”, you will see all the keybindings for changing focus.https://flight-manual.atom.io/using-atom/sections/basic-customization/#_customizing_keybindings
Atom keymaps use selectors to associate key combinations with events in specific contexts. Here's a small example, excerpted from Atom's built-in keymap:'atom-text-editor': 'enter': 'editor:newline' 'atom-text-editor[mini] input': 'enter': 'core:confirm'
This keymap defines the meaning of Enter in two different contexts. In a normal editor, pressing Enter triggers theeditor:newline
command, which causes the editor to insert a newline. But if the same keystroke occurs inside a select list's mini-editor, it instead triggers thecore:confirm
command based on the binding in the more-specific selector.remove trailing whitespace doesn't work for markdown fileThere was a new configuration option (whitespace.keepMarkdownLineBreakWhitespace) introduced by af9edc6 that you have to edit, and right now it allows any whitespace greater than 1 character, rather than the previous stripping of anything that isn't 2 trailing spaces.When you open a new file by single-clicking in the Tree View, it will open in a new tab with an italic title. This indicates that the file is "pending". When a file is pending, it will be replaced by the next pending file that is opened. This allows you to click through a bunch of files to find something without having to go back and close them all.You can confirm a pending file by doing any of the following:
- Double-clicking the tab of the file
- Double-clicking the file in the tree view
- Editing the contents of the file
- Saving the file
You can enable column selection mode using Ctrl+Shift+↑/↓. This will allow you to extend the cursor to multiple rows. Once you have selected all rows, release the keys, and use the Delete key to remove the text you want to replace. Once you're done, press the Esc key to release the cursors.How to Disable Mission Control (conflicting) Key Bindings (Mac)
Locate the key bindings for Mission Control and Applications windows:Just Select the text, use command palette(cmd + shift + P)
> delete-whitelines:toggle oralt+shift+D
(for MAC & windows) to remove empty lines within the selected text area.
apm installConfiugrationUnder your AtomPreferences
go toPackages
tab and search forwhitespace
. Click on thewhitespace
package and uncheckEnsure Single Trailing Newline
optionShortcuts:Toggle Tree View ⌘-\Fuzzy Find Files ⌘-tIncrease Font Size cmd-+Decrease Font Size cmd—Find String in Current File ⌘-fFind String in All Project Files ⇧-⌘-fReplace String in Current File ⌥-⌘-fSelect Grammar ⌃-⇧-LDelete Line ⌃-⇧-kToggle Autocomplete ⌃-spaceConvert Line Endings To
->Unix Format
/Windows Format
/Old Mac Format
Or, in Command Palette (cmd-shift-p
orctrl-shift-p
), typeConvert To Unix Format
, orConvert To Windows Format
, orConvert to Old Mac Format
Spell-CheckUsecmd+shift+:
to bring up the list of corrections when your cursor is on a misspelled word.It's a pretty common tab switching convention in OSX to use Cmd+Shift+{ and Cmd+Shift+} to switch between tabs, which is what it uses by defaultNot sure why anyone would prefer Ctrl-Tab and Ctrl-Shift-Tab over Cmd-Shift-{ and Cmd-Shift-}.Change the setting to enable it. - disabled by defaultAlready there. Check the Whitespace package:https://discuss.atom.io/t/feature-request-find-and-replace-in-selection/8665
https://discuss.atom.io/t/manually-install-package/9251
Find and Replace in selection is available with the following box enabled:You can toggle the Tree View with the "Tree View: Toggle" command, Cmd+\ on OS X or Ctrl+\ on other platforms.