Using Atom editor.

By | 31/10/2016

I like a good editor with features for speed typing and development. I also like to keep the base of typing skills over my development work.
First I used sublime editor and is a great editor but is overpriced for me $70 and the free edition don’t has all of features. If you just want to build Atom from source, you can also do that with build instructions for Mac, Windows, Linux and FreeBSD.
Now I used Atom – version 1.11.2 and working great with windows 10. This editor can be used for development of javascript, html, text, python etc. I liked because has a good ergonomic view and typing.
Let’s see the starting of this editor.
atom editor
As we can see you can install packages, use theme, styling, change the init script, use snippet.
You can read the Atom Flight Manual – here.
Let’s start with some basic features:
The easiest way to install packages is open up your Atom editor then go to Packages -> Setting View -> Install Packages. You can see some basic packages can be used:
1 : tree-view – showing file view’s in tree manner on left side of editor;
2 : autcomplete – just press CTRL + Space keys while typing and it will show you the match;
3 : autocomplete-plus – this will show the suggestion based on what you are typing and what is your previous typed words by Typing CTRL+Space keys;
4 : Javascript Snippets – can be activated by typing cd and pressing TAB key;
5 : autocomplete html – can create lot’s of useful snippets of HTML by pressing TAB key ;
For example if you want to install python language, just go to Installed Packages and search language-python.
The editor come with snippet idea to reduce the repetitive part of your work.
You can used from atom editor or create your own snippet.
Snippets are regularly-used chunks of code you can quickly insert into your editor area.
Use File -> Snippets… and will open the snippets.cson file.
If you just use a blank file then you have few snippets: legal and lorem.
When you save the file with one extension then the snippets will come with that extension.
For example html files will have many snippets: todo, fix, xxx, idea, hack.
To see all available snippets for your current file type, just hit Alt+Shift+S keys.
The next step is to know some basic shortcuts of this editor:
General
Ctrl+, Preferences
Ctrl+Shift+p Toggle command palette
Ctrl+b Browse list of open files
Ctrl+Alt+r Reload Atom
Ctrl+Shift+l Change synatx highlighting
Alt+Shift+s Show available code snippets
Ctrl+Shift+m Markdown preview
Ctrl+Alt+i Toggle Developer Tools

File Management
Ctrl+n New file
Ctrl+Shift+n New Window
Ctrl+p Open file (type the name to perform a search)
Ctrl+o Open file
Ctrl+Shift+o Open folder
Ctrl+s Save
Ctrl+Shift+s Save as
Ctrl+w Close tab
Ctrl+Shift+w Close window

Editing Lines
Ctrl+g Go to line
Ctrl+l Select line
Ctrl+Shift+d Duplicate line
Ctrl+Shift+k Delete line
Ctrl+Arrow Up/Arrow Down Move line up/down
Ctrl+/ Toggle comment line
Ctrl+Enter New line below
Ctrl+[/] Indent / outdent selected lines
Ctrl+j Join lines

Editing Words and Brackets
Alt+b / f Move to beginning / end of current word
Alt+Shift+b / f Select to beginning / end of current word
Ctrl+Backspace OR Alt+h Delete to beginning of current word
Ctrl+Delete OR Alt+d Delete to end of current word
Ctrl+Alt+. Complete bracket
Ctrl+m Go to matching bracket
Ctrl+Alt+m Select code inside matching brackets

Code Folding
Ctrl+k, then Ctrl+1 … 9 Fold all code at indent level 1 … 9
Ctrl+Alt+/ Fold / unfold code
Ctrl+Alt+f Fold selected code
Ctrl+Alt+[/] Fold / unfold all code

Find and Replace
Ctrl+f Find in current file
Ctrl+Shift+f Find in project
F3 Find next
Shift+F3 Find previous
Ctrl+Enter Replace all
Ctrl+Alt+/ Use Regex in search
Ctrl+Alt+c Match case in search
Ctrl+Alt+s Search only in selection
Ctrl+Alt+w Match whole word

View
Ctrl+Shift+=/- Increase / decrease text size
Ctrl+0 (zero) Reset text size
F11 Toggle fullscreen

Tree View
Ctrl+0 (zero) or Alt+\ Toggle focus Tree View
Ctrl+k, then b or Ctrl+\ Toggle tree view
j/k Select next/previous item
h/l OR Arrow Right/Arrow Left Expand / collapse selected directory
Alt+ Arrow Left/Arrow Right OR Ctrl+Alt+[/] Recursively expand / collapse directories
Enter Open selected item
m OR F2 Move selected item
Backspace OR Delete Delete current item
d Duplicate selected item
Ctrl+1 … 9 Open selected item in pane 1 … 9
a Add new file
Shift+a Add new folder
i Toggle display of VCS ignored files

Github Integration
Alt+g, then b Open on Github: blame
Alt+g, then c Open on Github: copy-url
Alt+g, then g Open on Github: repository
Alt+g, then h Open on Github: history
Alt+g, then i Open on Github: issues
Alt+g, then o Open on Github: file
Alt+g, then r Open on Github: branch-compare

Manage Diffs
Alt+g, then d Toggle list of diffs in file
Alt+g, then Arrow Down/Arrow Up Move to next/previous diff in file

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.