Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Atom drills down into custom shortcuts


May 24, 2021 Atom


Table of contents


Go deep into custom shortcuts

Off-topic

Time has passed quite quickly, the official version has been out for a long time. T he latest version is V1.0.8 from the initial variety of inexplicable BUG, now slowly perfected, the use of the process can be clearly felt. The project is still active on Github, and the plug-in library is getting richer and richer.

As the opening step, bring another official download address.

There are currently github and domestic CNPM two places to go

  1. Github
  2. CNPMJS
    • The difference between the two is that the former is on Amazon S3, often downloaded to half without resources (tangled!) ;
    • CNPMJS is a domestic NPM, very friendly to domestic users, the speed is appropriate.

Drill down to shortcuts

Custom key binding

unset!

As the name implies, cancel the setting. This is one of the highlights of atom, for example:

Atom drills down into custom shortcuts

Before imitation VIM, found out how overlay this goods still take effect, so I had to change to shortcuts. T hen go to check the official documents, found the unset function, very simple and practical. Cancel the shortcut command directly.

'atom-text-editor':
    'alt-h':'unset!'

Atom drills down into custom shortcuts

Such a simple command. it's just canceled because the setting in keymap is the highest weight.

Shortcut-supported combinations (official document map)

Atom drills down into custom shortcuts

  • In addition to the word this special function key, other must have modification keys (second line those, one or more mixed)

Supports binding for DOM events

Atom drills down into custom shortcuts

  • The official documentation demonstrates a listening event that inserts the date
  • Analysis: atom.commands are global constants and add is functional

Support for snippet and style selection

This function will be written later when snippet together said (still in tossing mid-to-toe)

Comes with a personal split-screen custom shortcut

 #设置候选全局上下移动及打开分割窗口
'body':
    'shift-alt-k':'core:move-up'  #光标向上移动
    'shift-alt-j':'core:move-down' #光标向下移动
    'shift-alt-h':'core:move-left' #光标向左移动
    'shift-alt-l':'core:move-right' #光标向右移动
    'ctrl-h ctrl-h':'pane:split-left'      #分割窗口
    'ctrl-j ctrl-j':'pane:split-down'      #分割窗口
    'ctrl-k ctrl-k':'pane:split-up'         #分割窗口
    'ctrl-l ctrl-l':'pane:split-right'     #分割窗口
    'alt-h alt-h':'window:focus-pane-on-left'      #移动左窗口
    'alt-j alt-j':'window:focus-pane-below'      #移动下窗口
    'alt-k alt-k':'window:focus-pane-above'         #移动上窗口
    'alt-l alt-l':'window:focus-pane-on-right'     #移动右窗口
    'ctrl-d ctrl-d':'pane:close'  #关闭面板