Customize Keyboard Shortcuts
I installed a package atom-textile-preview, and want to toggle preview panel with keyboard shortcuts 'Ctrl-Alt-m'.
First get the command of the 'toggle' action in file
menus/textile-preview.cson in atom-textile-preview :
textile-preview:toggle
.
Open 'keymap.cson' with 'Edit -> Keymap'. Add the following lines in it:
'atom-text-editor':
'ctrl-alt-m': 'textile-preview:toggle'
No need to restart atom. The shortcut will work after you save 'keymap.cson'. See Keymaps In-Depth for details about shortcuts customization.
Import Global Settings
ctrl-.
: toggle Keybinding Resolver;
ctrl-,
: open "Settings" panel;
Search shortcuts in [Settings -> Keybindings]
Packages Management
- Export to a file:
apm list --installed --bare > atom_pkgs.list
- Install from the file:
apm install --packages-file atom_pkgs.list
Installed package list (2017.3.16):
$ atom --version
Atom : 1.14.3
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
$ apm list --installed --bare
clipboard-plus@0.5.1
markdown-preview-plus@2.4.3
pandoc@0.2.2
vim-mode-clipboard-plus@0.2.0
vim-mode-plus@0.82.3
Important Packages
Markdown Preview
Install markdown-preview-plus
(v 2.4.3).
Toggle preview window with Ctrl-Shift-M
.
vim mode
Frequently used shortcuts in Vim Mode:
ctrl-k s/v: split panel horizontal/vertical;
ctrl-w,w: switch focus between 2 panels;
ctrl-w, h/j/k/l: switch focus to left/down/up/right panel;
ctrl-w,q: close panel;
Get all shortcuts in vim mode in ~/.atom/packages/vim-mode/keymaps/vim-mode.cson
vim-mode-clipboard-plus
Use yy
to copy from Atom to outside,
and use p
to paste from outside into Atom.
If you install vim-mode-plus instead of vim-mode,
check Use Vim Mode Plus
in the Settings
of this plugin.
ex-mode
Use :w
, :q
, :sv
, :sp
.
Keyboard localization
Purpose: use ";" instead of ":" in vim-mode to invoke ex-command.
Install this package, and create file "/home/leo/.atom/packages/keyboard-localization/mykeymaps.json":
{
"186": {
"unshifted": 58
}
}
Set above path value to [Settings -> Packages -> keyboard-localization]: Settings, "Use Keyboard Layout From Path".
See Keyboard localization for how to generate above json file.
Git
For example: discard all changes from last commit:
ctrl-shift-h
Run
reset --hard HEAD