065 Atom

10 Jan 2016

Atom is a hackable text editor. In this episode, we will go through the various settings, packages, themes and also create a super simple package.

Download video: mp4

Sample code: Github

Version: 1.3.3

Similar episodes: 008 Sublime, 041 Vim

Background on Atom

  1. Homepage and source code

Things to learn with Atom

install

  1. Download the app
    • in the command line, check the version: atom -v
    • check the path of the executable which atom
    • help command atom -h
    • open current directory with atom . or file atom filename
    • atom package manager (apm) version apm -v
    • apm help command apm -h
    • path of atom related config and packages open ~/.atom
    • configs are in *.cson format

settings

  1. Open setting with Atom > Preferences or key bindings shift + cmd + p

key bindings

  1. list of helpful key bindings
    • Search for the key binding to edit / add in Settings > Sidebar > Keybindings
    • Search for Markdown
    • Copy the keystroke
    • Click Open your keymap file
    • Paste the keystroke and edit it
    • Test out the new keystroke!

packages

  1. Open Settings > Packages > Core Packages
    • View directory ~/.atom/packages
    • Install Emmet
    • Install pigments in cli with apm install pigments
    • View directory ~/.atom/packages to see the installed packages

themes

  1. Open Settings > Themes
    • install themes with apm install {THEME_NAME}

creating packages

  1. Hacking Atom - How to create a package?
    • package generator
    • Shift + Cmd + p > Package Generator to create new package files from generator
    • see package.json keys for Atom and NPM
    • edit the contents of package.json
    • see keymaps and menus to trigger the commands
    • open the editor in dev mode with atom -d
    • test out your edits from keymaps and menus
    • Alt + Cmd + i to open the developer panel
    • amend the styles of the message div

css { padding: 29px; font-size: 53px; background-color: wheat; color: red; } - Event based subscription - code a simple package - publish to atom with apm publish patch

More Resources on Atom

  1. essential atom packages

Cathedral and Bazaar