Editor

Shortcut

Function (MacOS)JetBrains IDEAiTerm2VimCommon Editor
上/upControl + pControl + pkControl + p
下/downControl + nControl + njControl + n
左/leftControl + bControl + bhControl + b
右/rightControl + fControl + flControl + f
行首/Move Caret to Line StartControl + aControl + a^Control + a
行尾/Move Caret to Line EndControl + eControl + e$Control + e
下一页/Page DownControl + d
上一页/Page UpControl + u
选中/Add Selection for Next OccurrenceControl + g
全选/Select All OccurrencesControl + Command + g
撤销/UndoCommand + zuCommand + z
返回撤销/RedoShift + Command + zctrl + r
水平右侧分屏/ Split RightShift + Command + v
全局查找/ Find in FilesShift + Command + f
往前/ForwardCommand + ]
后退/BackCommand + [
下一个方法/Next MethodControl + y
重命名/RenameShift + ^
创建Java文件/New Java ClassShift + Command + j
创建文件/New FileShift + Command + i
创建文件夹/ New DirectoryShift + Command + p

Font

JetBrains
FontJetBrains Mono
Size18
Line height1.4

Live Templates(Jetbrains Editor Only)

############################################
##########          Log         ############
############################################
lgi = 'log.info("[$className$:$method$] $content$", "$arg$");'
lgw = 'log.warn("[$className$:$method$] $content$", "$arg$");'
lge = 'log.error("[$className$:$method$] $content$", "$arg$");'

############################################
##########          SQL         ############
############################################
ctable = 'create table `$table$`
(

    `create_time`               DATETIME(3)     NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
    `update_time`               DATETIME(3)     NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT '更新时间',
    PRIMARY KEY (`id`) using btree,
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_unicode_520_ci COMMENT $comment$;'
col = '`$col$`                  $type$       NOT NULL COMMENT '$comment$',$END$'
cid = '`id`                     BIGINT       NOT NULL AUTO_INCREMENT COMMENT 'id','

Shell

Alias

############################################
##########          Git         ############
############################################
alias gs='git status'
alias gp='f() { git push $1 $2 };f'
alias gpl='f() { git pull $1 $2 };f'
alias gc='f() { git commit -m "$1" };f'
alias gss='f() { git stash save $1 };f'
alias gsp='f() { git stash pop $1 };f'
alias gck='f() { git checkout $1 };f'
alias gckb='f() { git checkout -b $1 };f'
alias gm='f() { git merge $1 };f'
alias gl='git log'
alias gcp='f() { git cherry-pick $1 };f'

Zsh

# oh-my-zsh
# zsh plugins (git and zsh-autosuggestion)

Command

Vim

.vimrc

set encoding=utf-8
set fileencoding=utf-8
syntax on
set number
set relativenumber
set ignorecase
set smartcase

SSH

config

Host github.com
	HostName github.com
	Port 22
	User git
	IdentityFile ~/.ssh/id_rsa
Host *
	ServerAliveInterval 300
 	TCPKeepAlive=yes
    	ServerAliveInterval 60
    	ServerAliveCountMax 600
    	GSSAPIAuthentication yes
    	GSSAPIDelegateCredentials no
    	StrictHostKeyChecking no
    	HostKeyAlgorithms +ssh-rsa
    	PubkeyAcceptedKeyTypes +ssh-rsa