This file contains 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
" toggle unite, quickfix list and location list | |
if exists("g:loaded_toggle_list") | |
finish | |
endif | |
let g:loaded_toggle_list = 1 | |
function! s:GetBufferList() | |
redir =>buflist | |
silent! ls |
This file contains 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 |
This file contains 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 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 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 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
var chart = highchart(this.el, opts).highcharts(); | |
var svg = chart.getSVG(); | |
request | |
.post('/image') | |
.send({ | |
xml: svg | |
}) | |
.set('Accept', 'application/json') | |
.end(function(err, res) { | |
if(err) throw err; |
This file contains 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 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
require('longjohn') | |
var prettyjson = require('prettyjson') | |
function formatJson(object) { | |
// adds 4 spaces in front of each line | |
var json = prettyjson.render(object) | |
json = json.split('\n').join('\n ') | |
return ' ' + json | |
} | |
function playNiceError(error) { | |
// remove longjohn properties that break prettyjson |
This file contains 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 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>webview ad for testing</title> | |
</head> | |
<body> | |
<div id="info">info</div> | |
<div id="download">download</div> |