Configuring Vimrc to use googlecl

I started using google docs to collaborate with other users who can't / won't break and don't study the standard vim / latex / git workflow for writing and collaboration. Google has a googlecl command line interface that allows you to call something like:

$ googlecl docs edit --title "Some Document" --editor vim

which allows me to edit my google docs in vim.

I would really like to be able to change some vim settings if the file I'm working on is a google docs file. The simplest example is changing string wrappers. Is there a way to use type construct augroupfor googlecl docs? Is this possible at present, or will it require me to miss the source?

+3
source share
1 answer

How to create a very simple bash script in ~/binthat looks like this?

#!/bin/sh
vim -c 'set ft=google_docs' $@

Save it as you ~/bin/google_vimdo chmod +x ~/bin/google_vim. Then create a file:

~/.vim/ftplugin/google_docs.vim

with the necessary settings (for example, set nowrapor something else) and start the editor with

googlecl docs edit --title "Some Document" --editor google_vim

(assuming what ~/binis in your way: if you could not do --editor ~/bin/google_vim)

+6
source

Source: https://habr.com/ru/post/1777845/


All Articles