目录

Mac 实用命令收集二

记录一些终端中的技巧和命令,鉴于经常使用终端,在某个不经意的瞬间忘记了『还有这种操作』,特此记录以飨自己。

移除打开终端时的提示语

1
2
// 创建 .hushlogin 文件
$ touch .hushlogin

终端中使用 telnet

1
2
// 安装 telnet
$ brew install telnet

终端中使用上传下载

1
2
// 安装 lrzsz
$ brew install lrzsz

检索文件

1
2
3
4
5
// 更新索引
$ sudo /usr/libexec/locate.updatedb

// 检索文件
$ locate xxx.xxx

masOS VSCode Vim 模式无法持续按键

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
// For VSCode
$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

// For VSCode Insiders
$ defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false

// For VSCodium
$ defaults write com.visualstudio.code.oss ApplePressAndHoldEnabled -bool false

// To enable global key-repeat
// this is helpful if you\'re using Vim in a PWA like code-server
$ defaults write -g ApplePressAndHoldEnabled -bool false
OR
$ defaults delete -g ApplePressAndHoldEnabled

// 查看对 com.microsoft.VSCode 的设置
$ defaults read com.microsoft.VSCode ApplePressAndHoldEnabled