Created
January 10, 2014 10:47
-
-
Save mtmtcode/8349988 to your computer and use it in GitHub Desktop.
現在のタブで開いているRedmineチケットの番号,タイトル,URLをコピー
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
js <<EOS | |
commands.addUserCommand( | |
['tcopy'], 'Copy ticket number and subject', | |
function() { | |
var matches = document.title.match(/#([0-9]+): ([^ ]+)/); | |
var num = matches[1]; | |
var subject = matches[2]; | |
var copiedStr = '#'+num+' '+subject; | |
util.copyToClipboard(copiedStr+"\n"+content.location); | |
liberator.echo("Copied :" + copiedStr); | |
}, | |
null, | |
true | |
) | |
EOS | |
map <silent> <C-y> :tcopy<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment