diff --git a/.vimrc b/.vimrc index 1e095d3..eb27c0f 100644 --- a/.vimrc +++ b/.vimrc @@ -14,6 +14,20 @@ " " Make sure you use single quotes " " " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +" + +" only use copilot on Mac +let s:usecopilot = 0 +if has('mac') + let s:route = system("netstat -nr | grep 'default.*tun' | head -1") + if s:route != "" + let s:usecopilot = 1 + endif +endif + + +" use ssh for cloning +" let g:plug_url_format = 'git@github.com:%s.git' call plug#begin() @@ -28,7 +42,10 @@ Plug 'vim-airline/vim-airline-themes' Plug 'bling/vim-bufferline' Plug 'tpope/vim-characterize' Plug 'tpope/vim-endwise' -Plug 'github/copilot.vim' + +if s:usecopilot == 1 + Plug 'github/copilot.vim', { 'on': 'Copilot' } +endif Plug 'frankier/neovim-colors-solarized-truecolor-only' @@ -86,3 +103,6 @@ hi Visual term=reverse cterm=reverse guibg=Grey imap (copilot-next) imap (copilot-previous) imap (copilot-dismiss) + +" vim: set ft=vim: +" vim: set sw=4 ts=4 sts=4 et: