Skip to content

Atom

Atom is GitHub’s open-source, hackable text editor built on web technologies. Though archived in December 2022, it remains feature-rich with extensive keyboard shortcuts, package management through apm, theming, and deep customization.

Installation

macOS

# Homebrew installation
brew install atom

# Verify installation
atom --version

Ubuntu/Debian

# Add PPA
sudo add-apt-repository ppa:webupd8team/atom

# Install
sudo apt update
sudo apt install atom

# Via Snap (alternative)
sudo snap install atom --classic

Windows

# Chocolatey installation
choco install atom

# Scoop installation
scoop install atom

# Winget installation
winget install GitHub.Atom

# Or download from https://github.com/atom/atom/releases

Opening Files and Directories

CommandDescription
atom <file>Open file in Atom
atom <directory>Open directory as project
atom .Open current directory
atom -aOpen in existing Atom window
atom -nOpen in new Atom window
atom --safeLaunch in safe mode (disables packages)
atom --profile <path>Run with specific profile
atom -wWait for file to be closed before exiting

Keyboard Shortcuts - Editor Navigation

ShortcutAction
Ctrl+B / Cmd+BOpen fuzzy file finder
Ctrl+P / Cmd+PQuick open file (same as Ctrl+B)
Ctrl+Alt+L / Cmd+Shift+UToggle soft tabs/hard tabs
Ctrl+Home / Cmd+HomeGo to beginning of file
Ctrl+End / Cmd+EndGo to end of file
Ctrl+G / Cmd+GGo to line
Ctrl+R / Cmd+RFind symbol in file
Ctrl+Shift+P / Cmd+Shift+PToggle command palette
Ctrl+, / Cmd+,Open Settings

Keyboard Shortcuts - Editing

ShortcutAction
Ctrl+D / Cmd+DSelect current word
Ctrl+F / Cmd+FFind in file
Ctrl+H / Cmd+Option+FFind and replace
Ctrl+L / Cmd+LSelect entire line
Ctrl+Shift+DDuplicate line
Ctrl+Shift+K / Cmd+Shift+KDelete line
Ctrl+J / Cmd+JJoin lines
Ctrl+Alt+B / Cmd+Shift+BToggle code folding
Ctrl+Alt+, / Cmd+Alt+,Fold selected region
Ctrl+Alt+. / Cmd+Alt+.Unfold selected region
TabIndent/autocomplete
Shift+TabUnindent

Keyboard Shortcuts - Selection & Cursor

ShortcutAction
Ctrl+A / Cmd+ASelect all
Ctrl+Shift+MSelect to matching bracket
Ctrl+MJump to matching bracket
Ctrl+Shift+UpAdd cursor above
Ctrl+Shift+DownAdd cursor below
Ctrl+Alt+ZToggle soft wrap
Alt+Shift+L / Cmd+Option+LReflow paragraph
Ctrl+/ / Cmd+/Toggle line comment
Ctrl+Shift+/ / Cmd+Shift+/Toggle block comment

Keyboard Shortcuts - Panels

ShortcutAction
Ctrl+\ / Cmd+\Toggle tree view (sidebar)
Ctrl+Shift+Y / Cmd+Shift+UToggle developer tools
Ctrl+K Ctrl+RightFocus right pane
Ctrl+K Ctrl+LeftFocus left pane
Ctrl+K Ctrl+UpFocus up pane
Ctrl+K Ctrl+DownFocus down pane
Ctrl+K Ctrl+WClose pane

APM (Atom Package Manager)

Basic Package Commands

# List installed packages
apm list

# List featured packages
apm featured

# Search for package
apm search package-name

# Install package
apm install package-name

# Install specific version
apm install package-name@1.0.0

# Upgrade all packages
apm upgrade

# Upgrade specific package
apm upgrade package-name

# Uninstall package
apm uninstall package-name

# Disable package without uninstalling
apm disable package-name

# Enable disabled package
apm enable package-name

# Check for updates
apm update

Advanced Package Management

# Install from GitHub repository
apm install username/repository

# Install from Git URL
apm install git://github.com/user/repo.git

# View package details
apm view package-name

# Publish your own package
apm publish major|minor|patch

# Link local package for development
apm link

# Unlink local package
apm unlink

# Clean up dependencies
apm clean

# Update apm itself
apm update -g apm
# Linting and syntax
apm install linter
apm install linter-eslint
apm install linter-pylint

# Code formatting
apm install prettier
apm install python-black

# Version control integration
apm install git-plus

# Collaboration
apm install teletype

# Productivity
apm install todo-show
apm install minimap
apm install multiple-cursors

# Language support
apm install language-go
apm install language-rust
apm install language-vue

# Themes
apm install material-ui
apm install dracula-theme
apm install one-dark-ui

Configuration Files

Main Config File

Located at ~/.atom/config.cson:

"*":
  core:
    themes: ["one-dark-ui", "one-dark-syntax"]
    font: "Monaco"
    fontSize: 14
    tabLength: 2
    preferredLineLength: 80
    telemetryConsent: "no"
  editor:
    fontSize: 14
    fontFamily: "Fira Code"
    showIndentGuide: true
    showInvisibles: false
    invisibles:
      cr: "¤"
      eol: " "
      space: "·"
      tab: "→"
  "linter-eslint":
    fixOnSave: true
  "prettier":
    formatOnSave: true

Keymap Configuration

Located at ~/.atom/keymap.cson:

"atom-text-editor":
  "ctrl-alt-l": "editor:log-cursor-position-debug"
  "cmd-shift-l": "editor:toggle-line-comments"

"atom-workspace":
  "ctrl-shift-p": "command-palette:toggle"
  "ctrl-shift-o": "tree-view:open-file"

Snippet Configuration

Located at ~/.atom/snippets.cson:

".source.js":
  "console.log":
    "prefix": "clg"
    "body": "console.log(${1:value})"
  "Function":
    "prefix": "fn"
    "body": "function ${1:name}(${2:params}) {\n  ${3:body}\n}"

".source.python":
  "Print":
    "prefix": "pr"
    "body": "print(${1:value})"

Themes

UI Themes

# Dark themes
apm install one-dark-ui
apm install atom-material-ui
apm install dracula-theme

# Light themes
apm install one-light-ui
apm install solarized-light-ui
apm install atom-light-ui

Syntax Themes

# Popular syntax themes
apm install one-dark-syntax
apm install one-light-syntax
apm install dracula-syntax
apm install monokai-syntax
apm install solarized-dark-syntax

Configuration Examples

Enable Auto-Save

"*":
  "autosave":
    enabled: true

Configure For Different Languages

".source.python":
  editor:
    tabLength: 4
    softTabs: true
    rulers: [79, 119]

".source.javascript":
  editor:
    tabLength: 2
    softTabs: true

".source.go":
  editor:
    tabLength: 4
    softTabs: false

Custom Keybindings

"atom-text-editor":
  "cmd-k cmd-s": "editor:split-selections-into-lines"
  "alt-[": "editor:move-line-up"
  "alt-]": "editor:move-line-down"
  "ctrl-shift-x": "editor:cut-select-mode"

Project Management

Opening Projects

# Open as project
atom project-directory/

# Add folder to current project
# File > Add Project Folder

# Save current project
# File > Save Project As

Project Configuration

.atom-project.json in project root:

{
  "title": "My Project",
  "paths": [
    "."
  ],
  "sourceRoot": "src",
  "focusedPath": "src"
}

Workflow Tips

Find and Replace With Regex

Ctrl+H (Cmd+Option+F on Mac)

Enable regex toggle: Alt+R (Option+Cmd+R on Mac)

Example patterns:
- Find: (\w+)\s*:\s*function
  Replace: $1()

- Find: console\.log\((.*?)\)
  Replace: // $1

Multiple Cursors

Ctrl+D - Select word and add next occurrence
Ctrl+Alt+Shift+D - Select all occurrences of word
Ctrl+Shift+L - Split into multiple cursors

Bracket Matching

Ctrl+M - Jump to matching bracket
Ctrl+Shift+M - Select to matching bracket

Enable Smart Open Pair:
Settings > Editor > Smart Open Pair

Git Integration (with git-plus package)

# After installing: apm install git-plus

Cmd+Shift+H - Toggle git history
Cmd+Shift+A - Add/stage file
Cmd+Shift+O - Open git blame
Cmd+Shift+B - Open branch menu

Troubleshooting

Package Won’t Install

# Clear npm cache
apm clean

# Rebuild packages
apm rebuild

# Check for errors
apm install package-name --verbose

Disable All Packages (Safe Mode)

atom --safe

Inspect Element (Debug)

# Open developer tools
Ctrl+Shift+Y (Cmd+Shift+U on Mac)

# Inspect element
Cmd+Option+I (Chrome-style)

Reset Atom to Defaults

# Backup first
mv ~/.atom ~/.atom.backup

# Atom will regenerate default config
atom

Advanced Usage

Creating Custom Packages

# Generate package structure
apm generate atom-my-package

# Navigate to package
cd atom-my-package

# Install dependencies
npm install

# Link package for testing
apm link

# Publish when ready
apm publish major|minor|patch

Custom Grammar (Syntax Highlighting)

Create .atom/grammars/custom.cson:

name: "Custom Language"
scopeName: "source.custom"
fileTypes: ["custom"]
patterns: [
  {
    match: "\\b(if|then|else)\\b"
    captures:
      0:
        name: "keyword.control"
  }
]

Debug Mode

# Run with verbose logging
atom --dev

# Check package activation
apm list --enabled

# View slow packages
atom --profile-startup

Performance Optimization

Disable Unused Features

Settings > Core > Disable:

  • Automatically Update if using package manager
  • telemetryConsent

Reduce Package Load

# Keep only essential packages
apm list | grep enabled | wc -l

# Disable heavy packages
apm disable atom-beautify
apm disable linter-eslint  # Use instead of eslint plugin

Resources


Last updated: 2025-03-30 | Atom archived December 2022