Skip to content

Instantly share code, notes, and snippets.

@uzimith
Last active August 29, 2015 14:12
Show Gist options
  • Save uzimith/0a32fc2cd5891121f282 to your computer and use it in GitHub Desktop.
Save uzimith/0a32fc2cd5891121f282 to your computer and use it in GitHub Desktop.
var iTerm = Application("iTerm");
var Finder = Application("Finder");
var selection = [].slice.call(Finder.selection());
var names = selection.map(function(item){
return item.url();
});
iTerm.activate();
var term = iTerm.currentTerminal();
session = term.launch({session: "Dafault"});
session.write({text: "vim " + names.map(function(i){return '"' + i + '"'}).join(" ")});'})})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment