vim-macos


Ⅰ. 插件描述

Autoload functions to help vim user work with macos

Ⅱ. 基本信息

创建日期:  2016-01-21
使用用户:  0
Github星:  0
插件作者:  qiming zhao

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/vim-macos-already-like-death'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/vim-macos-already-like-death'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/vim-macos-already-like-death'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone 

Ⅳ. 文档说明

This project is hosted at https://github.com/chemzqm/vim-macos

It expose three simple function to help interactive with macos

API

  • macos#open(argument) open argument(could be any path) with open command
  • macos#ItermOpen(dir) active iterm2 (only support version > 2.9) and open
      directory in a new tab
  • macos#keycodes(list...) send keycode(s) to MacOS

Example

  • Make mappings for NeteaseMusic next song, previous song and pausestart
nnoremap <silent> <D-[> :call macos#keycodes('option', 'command', 'left')<cr>
nnoremap <silent> <D-]> :call macos#keycodes('option', 'command', 'right')<cr>
nnoremap <silent> <D-i> :call macos#keycodes('option', 'command', 'space')<cr>

Note, MacVim is needed for command key mapping, system global shortcut of NeteaseMusic have to be activated

  • A keymapping make iterm2 open directory of current file
nnoremap <leader>to :call macos#ItermOpen(expand('%:p:h'))<cr>
  • A keymapping make Finder open directory of current file
nnoremap <leader>fo :call macos#open(expand('%:p:h'))<cr>

Note, <D-o> in MacVim only open current working directory

添加新评论