Journal: Software Development

Email: mail@appsoftware.com

Software development notes and articles

A journal for sharing all things software development related


Atom

Fri, 21 Jun 2019 09:26 UTC

Atom

APM

You can use the command line to install atom packages

    $ apm install python-debugger language-python

Config

Open command pallete and search 'config' to edit ~/.atom/config.cson file.

Command Pallete

Keyboard shortcut: C-S-p

Source: https://flight-manual.atom.io/getting-started/sections/atom-basics/

For package installation then type 'install package'. select Install Packages and Themes.

Search for the package you need:

https://atom.io/packages

Keyboard shortcuts

List

https://github.com/nwinkler/atom-keyboard-shortcuts

Close Tab

C-w

Open project folder

C-S-a

Find file (with project open)

C-t

Find / Replace

Find in current file

C-f

Find in Project

C-S-f

Can also add filename filters

Multiline select

Alt-Shift-DownArrow (Linux / GNU)

https://discuss.atom.io/t/how-to-create-multiline-cursors/10998

Replace Tabs with Spaces (and Spaces with Tabs)

https://stackoverflow.com/questions/41848002/how-to-replace-tabs-with-spaces-in-atom

Atom has a built-in tool for this.\

Activate the command palette (ShiftCmdP on Mac, CtrlShiftP on Windows/Linux) and search for "convert space" or "convert tab". You should find these three commands are available:

Whitespace: Convert Spaces to Tabs Whitespace: Convert Tabs to Spaces Whitespace: Convert All Tabs to Spaces

Useful Packages

Column selection

For column text selection.

https://atom.io/packages/sublime-style-column-selection

Can then use Alt + left mouse click to drag select columns

Find List

https://atom.io/packages/find-list

Shows find results as list

Markdown Preview (Core)

For previewing rendered markdown

https://atom.io/packages/markdown-preview (Installed by default)

Keyboard shortcut: C-S-m to render preview.

Find and Replace (Core)

https://atom.io/packages/find-and-replace

For RegEx find and replace, put () brackets around each section of text to replace and then use $1 $2 to reinsert the captures along with any other text characters in the replace operation. The below image shows syntax for retaining the captures along with a space.

AtomFindReplace.PNG

Project Manager

https://atom.io/packages/project-manager

Allows you to save and open projects

For all commands (save project etc)

C-S-p > Project Manager

List projects

A-S-p

Settings:

Check 'Always Open In Same Window' to prevent it from opening a new instance of atom each time.

Projects save location:

Use 'Edit Projects' command to find

    "C:\Users\<user>\.atom\projects.cson"

Split Diff

Diff tool in atom, works well with projects. Can 'diff with active file' in tab headers and in the prject menu to get a side by side diff.

https://atom.io/packages/split-diff

Checking Key Bindings

If the keybinding you're using isn't working as expected, you can check your keybindings by using shortcut C-.to open the Key Binding Resolver

Package Location

Windows: <\user>.atom\packages

Can remove packages by deleting from folders.

General Settings

Open command pallete and search settings.

Select 'Settings View: Open'

Package Settings

Use C-S-p to open command pallete.

Search 'packages'

Select 'View Installed Packages'

Search for your package.

Click settings

Open With Atom (Context Menu)

https://discuss.atom.io/t/open-with-atom-not-showing-up-in-context-menu/33161

Open Settings and click on System. You’ll see checkboxes for 'Show in file context menus' and 'Show in folder context menus'

Themes

Open command pallete.

Settings View: Change Themes

One Dark for UI and Syntax (Dark) One Light for UI and Syntax (Light)

Making Atom Faster

https://medium.com/jsessentials/make-atom-fast-faster-fastest-1db17653beb5

Trouble Shooting

Proxies

General proxy settings

Find setting: Core > Use Proxy Settings When calling APM

If getting error unable to verify first certificate (Due to network proxy)

https://github.com/atom/atom/issues/16361

In terminal (tested in Windows 2019/09/25) run the following

apm config set strict-ssl false

The information on this site is provided “AS IS” and without warranties of any kind either express or implied. To the fullest extent permissible pursuant to applicable laws, the author disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability, non-infringement and suitability for a particular purpose.