郁郁青青 长过千寻

MAC TERMINAL CHEAT SHEET

    笔记本

  1. 我会使用的快捷键 My Common Shortcuts
  2. Visual Studio Code
    1. 我的 VS Code 快捷键配置 My VS-Code Shortcuts
  3. 软件快捷键
  4. SHORTCUTS
  5. CORE COMMANDS
  6. COMMAND HISTORY
  7. FILE MANAGEMENT
  8. DIRECTORY MANAGEMENT
  9. HELP

我会使用的快捷键 My Common Shortcuts

key/command description 环境 来源
⌘-b 打开侧边栏 show activity bar vsc
⌘k-m 选择语言 select language mode vsc
⌘-j 打开内置终端 show internal terminal vsc
⌘-shift-e 打开文件目录树 show file tree vsc
⌘-shift-t 打开最近关闭标签页 vsc
⌘-n 新建标签页 vsc
⌘-w 关闭标签页 vsc
⌘-p 全局搜索文件 vsc
⌘-shift-o 当前文件搜索 symbol vsc
⌘-shift-f 全局搜索 vsc
⌘-shift-k 删除一行 vsc
⌘-shift-c 用系统终端打开当前项目 vsc
⌘-option-[ 闭合代码块 close file block vsc
ctrl-e 移动光标至行末 all
ctrl-a 移动光标至行首 all
ctrl-f 向后移动光标 all
ctrl-b 向前移动光标 all
ctrl-n 像下移动光标 all
ctrl-p 像上移动光标 all
⌘-` 切换当前应用的窗口 all
⌘-option-b 切换书签栏 Chrome
⌘-shift-b 打开书签管理器 Chrome

Visual Studio Code

Keyboard shortcuts for macOS

我的 VS Code 快捷键配置 My VS-Code Shortcuts

key/command description
⌘c-b 打开侧边栏 show activity bar
⌘k-m 选择语言 select language mode

软件快捷键

onenote:https://support.microsoft.com/en-us/office/keyboard-shortcuts-in-onenote-for-mac-20fa1619-0f1c-4f83-a3cc-41e12b366f2f

vscode: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf

SHORTCUTS

key/command description
tab auto-complete files and folder names
ctrl+a go to the beginning of the line you are currently typing on
ctrl+e go to the end of the line you are currently typing on
ctrl+u clear the line before the cursor
ctrl+k clear the line after the cursor
ctrl+w delete the word before the cursor
ctrl+t swap the last two characters before the cursor
esc+t swap the last two words before the cursor
ctrl+r lets you search through previously used commands
ctrl+l or command+k clears the screen
ctrl+c kill whatever you are running
ctrl+d exit the current shell

CORE COMMANDS

key/command description
cd home directory
cd [folder] change directory
cd ~ home directory,e.g.’cd ~/folder/‘
cd / root of drive
ls short listing
ls -l long listing
ls -a listing incl. hidden files
ls -lh long listing with human readable file sizes
ls -R entire content of folder recursively
sudo [command] run command with the security privileges of the superuser(super user do)
open [file] opens a file
open . opens the directory
top displays active processes,press q to quit
nano [file] opens the terminal it’s editor
pico [file] opens the terminal it’s editor
clear clear screen
q exit

COMMAND HISTORY

key/command description
history z shows the staff typed - add a number to limit the last z items
!! excute the last command typed
ctrl+r lets you search through previously used commands

FILE MANAGEMENT

key/command description
touch [file] create new file
pwd full path to working directory
ls -l .. long listing of parent directory
cd . current directory
cd .. parent directory
cd ../../ move 2 levels up
cat [file] concatenate files and print on the standard output
rm -i [file] remove with confirmation
rm -r [directory] remove a directory and contents
cp [file] [newfile] copy file to file
cp [file] [directory] copy file to directory
mv [file] [newfile] move/rename

DIRECTORY MANAGEMENT

key/command description
mkdir [directory] create new directory
mkdir -p [directory]/[directory] create nested directories
rm -r [directory] remove directory and contents

HELP

key/command description
[command] -h offers help
[command] –help offers help
[command] help offers help
man [command] show the help for command
whatis [command] gives a one-line description of command
页阅读量:  ・  站访问量:  ・  站访客数: