4 ms·
$ google docs edit --title "Shopping list" --editor vim You had me at hello. Too pretty. Also, and slightly off-topic: I cannot say how much I love Homebrew +
by telemachos 16y ago
$ google docs edit --title "Shopping list" --editor vim
You had me at hello. Too pretty.
Also, and slightly off-topic: I cannot say how much I love Homebrew + Github. I was halfway into writing a new formula for this, when I decided to check. Sure enough, there's already a formula to install. Actually, I think two people already submitted formulas. In any case, if you use Homebrew, you can install it now.
- jamesbritt 16y agoNo modifications to file, not uploading. Not so happy with gvim. Can't use anything that returns immediately or else the code doesn't see what you're doing.
- spicyj 16y agoYou should be able to use "gvim -f" as your editor and it won't detach itself from the terminal.
- jamesbritt 16y agoSweet! I had to wrap it in a script to get it to work, but it's rolling now. Thanks.
- telemachos 16y agoCare to share the script? I haven't been able to make it work with mvim yet. Thanks.
- jamesbritt 16y agoThis is on my Ubuntu box #!/usr/bin/env ruby `gvim -f "#{ARGV.join( ' ' )}"` Haven't installed google command line on the mac yet
- telemachos 16y agoThanks for this. I ended up coming up with this as a shell script on OSX: #!/bin/sh mvim -f -c"au VimLeave * !open -a Terminal" $@ The subcommand makes sure that when MacVim exits, focus returns right to the terminal I was in before MacVim opened.
- jokermatt999 16y agoIf you're using Vimperator and Firefox, pressing Ctrl-i will allow you to edit any text box in vim.
- telemachos 16y agoA quick update here: the googlecl package has been removed from Homebrew. The recommendation is now to install it via pip (which is available from Homebrew). Just in case someone sees this and wonders.
- ra 16y agoThanks! I was scratching my head there for a minute. EDIT: The pypi package is "googlecl"