This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ============================================================================ | |
" Description: Open url under cursor or git repository of a module | |
" Author: Qiming Zhao <[email protected]> | |
" Licence: Vim licence | |
" Version: 0.1 | |
" Last Modified: January 16, 2016 | |
" ============================================================================ | |
if exists('did_open_loaded') || v:version < 700 | |
finish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Warning: clientserver feature required for MacVim, check it by `:echo has('clientserver')` in MacVim | |
'use strict' | |
var lstream = require('./lstream') | |
var stream = new lstream() | |
var exec = require('child_process').exec | |
var hasError = false | |
stream.on('line', function (line) { | |
if (line.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! MyStatusSyntaxItem() | |
return synIDattr(synID(line("."),col("."),1),"name") | |
endfunction | |
function! MyStatusLine() | |
return "%2*%3.3{MyStatusModeMap()}%*" | |
\. s:GetPaste() | |
\. "%4*%0{MyStatusBranch()}%*" | |
\. " %f " . s:GetModifySymbol() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/autoload/dispatch/iterm.vim b/autoload/dispatch/iterm.vim | |
index 7b52012..068f95f 100644 | |
--- a/autoload/dispatch/iterm.vim | |
+++ b/autoload/dispatch/iterm.vim | |
@@ -21,22 +21,23 @@ function! dispatch#iterm#handle(request) abort | |
endfunction | |
function! dispatch#iterm#spawn(command, request, activate) abort | |
- let script = dispatch#isolate([], dispatch#set_title(a:request), a:command) | |
+ let script = s:isolate(a:request.command) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
osascript <<END | |
tell application "MacVim" | |
activate | |
end tell | |
END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Take <tab> for word complete only | |
" The 'complete' option controls where the keywords are searched (include files, tag files, buffers, and more). | |
" The 'completeopt' option controls how the completion occurs (for example, whether a menu is shown). | |
if exists('did_completes_me_loaded') || v:version < 700 | |
finish | |
endif | |
let did_completes_me_loaded = 1 | |
function! s:completes_me(shift_tab) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
git --no-pager grep --no-color --no-index --exclude-standard -n $1 | while read git_grep; do | |
file_and_line=$(echo "$git_grep" | cut -d : -f 1,2) | |
match=$(echo "$git_grep" | sed 's/[^:]*:[^:]*:\(.*\)/\1/') | |
column=$(echo "$match" | awk "{print index(\$0, \"$1\")}") | |
echo "$file_and_line:$column:$match" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
function! unite#sources#location_list#define() | |
return s:source | |
endfunction | |
let s:source = { | |
\ "name" : "location_list", | |
\ "description" : "output location_list", | |
\ "syntax" : "uniteSource__LocationList", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
function! unite#sources#quickfix#define() | |
return s:source | |
endfunction | |
let s:source = { | |
\ "name" : "quickfix", | |
\ "description" : "output quickfix", | |
\ "syntax" : "uniteSource__Quickfix", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Jump previous/next according to existence of unite, quickfix list, location list | |
" make sure only one list is opening | |
function! s:Filter(name) | |
return a:name =~# '\v\[(Location List|Quickfix List)\]' | |
endfunction | |
function! s:GetBuffer() | |
redir =>buflist | |
silent! ls |