首页 > 移动平台 > 详细

解决mac下vscode等应用中vim光标无法快速移动

时间:2021-05-11 17:26:05      阅读:19      评论:0      收藏:0      [点我收藏+]

在使用vscode 或者jupyterlab的时候,可能会习惯将编辑器的键盘布局映射为vim的,但出现了一个问题,macbook的长按‘hjkl’移动光标的功能好像不能用了,想要移动光标只能一下一下的敲,非常不方便,全局开启\关闭和分应用开启\关闭这个功能的方法如下:

# 全局开启
defaults write -g ApplePressAndHoldEnabled -bool false
# 全局关闭
defaults write -g ApplePressAndHoldEnabled -bool true
# vscode开启
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool true
# firefox开启
defaults write org.mozilla.firefox ApplePressAndHoldEnabled -bool false
# firefox关闭
defaults write org.mozilla.firefox ApplePressAndHoldEnabled -bool true

 

那么另一个问题来了,命令中com.microsoft.VSCode、org.mozilla.firefox这些怎么知道呢?
这就需要导出defaults文件,在里面找

# 导出
defaults read > defaults.txt

参考:
https://www.theguild.nl/how-to-enable-or-disable-the-press-and-hold-menu-in-mac-os-x/
http://blog.fireyang.com/2018/01/16/mac-visual-studio-code-vim-hold-key-bug/

https://blog.csdn.net/MacwinWin/article/details/105157077

 

解决mac下vscode等应用中vim光标无法快速移动

原文:https://www.cnblogs.com/feiquan/p/14755454.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!