Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/vim-macos
Make the MacOS system do some job
https://github.com/chemzqm/vim-macos
Last synced: about 1 month ago
JSON representation
Make the MacOS system do some job
- Host: GitHub
- URL: https://github.com/chemzqm/vim-macos
- Owner: chemzqm
- Created: 2016-01-15T14:01:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-15T16:28:56.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T12:33:30.650Z (about 2 months ago)
- Language: VimL
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Vim-macos
A simple plugin tries to extract some methods for interactive with MacOS system by
generate [applescript](https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptX/Concepts/ScriptingOnOSX.html)
when necessary.## 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
``` VimL
nnoremap :call macos#keycodes('option', 'command', 'left')
nnoremap :call macos#keycodes('option', 'command', 'right')
nnoremap :call macos#keycodes('option', 'command', 'space')
```*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
``` VimL
nnoremap to :call macos#ItermOpen(expand('%:p:h'))
```* A keymapping make Finder open directory of current file
``` VimL
nnoremap fo :call macos#open(expand('%:p:h'))
```*Note*, in MacVim only open current working directory
## New Feature
Welcome to fire a feature request in the [issue list](https://github.com/chemzqm/vim-macos/issues)
## License
MIT