osx系统使用技巧集锦

 

6.禁用dashboard

defaults write com.apple.dashboard mcx-disabled -boolean YES && killall Dock

5. 在Finder的标题栏显示全路径

$ defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

$ killall Finder

4. 用F8来退出vim

vim 有个ZZ可以保存退出,却没有一个键用来退出,每次都是

       :q!

来退出,我的小拇指很疼啊!

所以打算用F8来退出vim

使用下面的方法编写映射脚本

<?xml version="1.0"?>
<root>
  <item>
    <name>F8 to force quit vim</name>
    <identifier>private.force_quit_vim</identifier>
    <autogen>
        __KeyToKey__ 
        KeyCode::F8, 
        KeyCode::SEMICOLON,  ModifierFlag::SHIFT_L,
        KeyCode::Q, 
        KeyCode::1, ModifierFlag::SHIFT_L,
        KeyCode::RETURN
    </autogen>
  </item>
</root>

然后重新加载,选取映射,就可以了~

https://pqrs.org/osx/karabiner/xml.html.en#examples

https://github.com/tekezo/Karabiner/blob/version_10.22.0/src/bridge/generator/keycode/data/KeyCode.data

https://github.com/tekezo/Karabiner/blob/version_10.22.0/src/bridge/generator/keycode/data/ModifierFlag.data

3. 用command+L锁屏

mac的锁屏是command+option+eject(power)

我用的外接键盘,还是以前的win+L方便

 

2. 使用shift+insert作为paste

老式的终端,ctrl+insert为copy;shift+insert为paste

怎么在mac book上做到呢

你需要安装一个软件 Karabiner

安装好了后,启动

找到For PC Users

这样就可以了

 

1. 使用F9用来切换输入法

mac上的输入法切换是ctrl+space。如果我想一个键就搞定,比如映射成F9怎么做呢?

首先,还是用上面说的软件 Karabiner。打开下面的文件

这样子

command+o打开文件编辑

<?xml version="1.0"?>
<root>
  <item>
    <name>F9 to switch input-method</name>
    <identifier>private.switch_input_method</identifier>
    <autogen>__KeyToKey__ KeyCode::F9, KeyCode::SPACE, VK_CONTROL</autogen>
  </item>
</root>

写入上面的配置,刷新一下

最后,勾选一下配置,就生效了 

 神奇吧~~

posted on 2017-01-18 14:14  嘉禾李小龙  阅读(215)  评论(0编辑  收藏  举报

导航