Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/vim-iterm2-start
Start async task for iterm2 in vim
https://github.com/chemzqm/vim-iterm2-start
Last synced: about 1 month ago
JSON representation
Start async task for iterm2 in vim
- Host: GitHub
- URL: https://github.com/chemzqm/vim-iterm2-start
- Owner: chemzqm
- Created: 2015-12-28T21:05:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-20T17:38:22.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T12:37:40.550Z (about 2 months ago)
- Language: VimL
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Vim-iterm2-start
Dispatch a task for iTerm2 in MacVim, used for async command line task (eg: git
push and unite tests)It works much like [vim-dispatch](https://github.com/tpope/vim-dispatch), the
difference is it's works (only) with MacVim, iTerm2 latest and fish shell, in
order to keep it quite simple. The reason I made this is I found changing the
code of vim-dispatch is quite hard, and it doesn't support iTerm2 > 2.9Requirement:
* MacVim 7.3+
* iTerm2 > 2.9 currently in beta test (latest lightly build is preferred)
* fish shell (otherwise you will need change the code)
* Knowledge of command line tools## Update
* notification enabled, looks like:
## Command
* `ItermStart[!] [options] {command}`
Start task in current session of iTerm2, when prefix with `!`, not foucs the
iTerm window* -dir=... run command in given directory
* -title=... set label for iTerm2
* -no-wait disable the default prompt of `press enter to continue` on
command error* `ItermStartTab[!] [options] {command}`
Start task in a new tab session of iTerm2, options are the same as
`ItermStart` command*NOTE:* iTerm2 version > Build 2.9.20160103-nightly is required to make
iTerm2 run job at background corrently## Global varialbes
* `g:iterm_start_profile` is used for control the profile used by
`ItermStartTab`, you can crate a profile of iTerm2 called `fish` that use fish shell, and
config `ItermStartTab` to use fish shell by add:let g:iterm_start_profile = 'fish'
in your `.vimrc`
* `let g:iterm_start_enable=1` would enable Mac notification on command success.
support `growl` and `terminal-notifier`## Intergration
If you use [vim-test](https://github.com/janko-m/vim-test), you can make your
test run in background by adding below lines to your `.vimrc`:function! StartTest(cmd)
execute 'ItermStartTab! ' . a:cmd
endfunctionlet g:test#custom_strategies = {'start': function('StartTest')}
let g:test#strategy = 'start'## Send message back to MacVim
You can make use of the vim feature `clientserver` to send message back to your
MacVim, here is a example of creating a filter program that parse output of
mocha and fill the quickfix of MacVimhttps://gist.github.com/chemzqm/fd1313206c182884efbc
So you can jump to error location directly in your MacVim.
## License
MIT