shumphrey / fugitive-gitlab.vim

A vim extension to fugitive.vim for GitLab support
MIT License
266 stars 21 forks source link

Plug-vim not able to download automatically #12

Closed cbcoutinho closed 6 years ago

cbcoutinho commented 6 years ago

I want to use this plug in by loading it using vim-plug. All other plugins have no problem being cloned and downloaded automatically, but with fugitive-gitlab.vim, vim-plug all of a sudden wants me to type in my Github username and password as if I was doing an http(s) clone. It seems like it can't read my ssh data for some reason.

This doesn't happen with any other plugin, so I thought it is wasn't a vim-plug issue.

Any ideas?

shumphrey commented 6 years ago

I've not tried using vim-plug myself. Can you confirm what URL you are using to git clone fugitive-gitlab with?

cbcoutinho commented 6 years ago

Hmm that's a good question, I'm not quite sure how I would confirm that - maybe I can try to find a log file for vim-plug somewhere...

I mostly stick to the `Plug /' format for vim plugins hosted on github, and they are all cloned into nvim/plugged/ upon executing PlugInstall with neovim.

I'm not sure why this particular project responds otherwise.

On Mon, 11 Dec 2017 at 10:42 Steven Humphrey notifications@github.com wrote:

I've not tried using vim-plug myself. Can you confirm what URL you are using to git clone fugitive-gitlab with?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shumphrey/fugitive-gitlab.vim/issues/12#issuecomment-350671898, or mute the thread https://github.com/notifications/unsubscribe-auth/AMTd7AO280Ys_gl1yqX9x3Th330nlhstks5s_Pj0gaJpZM4Q8tzJ .

shumphrey commented 6 years ago

There isn't anything unique about this github repo. I doubt its something this repo is doing.

Can you paste your .vimrc with the plugin import statements?

shumphrey commented 6 years ago

Since this is a standard github repo, I suspect this is a set up issue. I'll close this ticket for now, feel free to re-open it if you find more details.

cbcoutinho commented 6 years ago

Hey there,

Sorry for the delay, here's a copy of my .vimrc to show you how it's set up. All packages are imported the same way, and the only one giving problems is fugitive-gitlab.vim. I use it for both vim 7.4+ and neovim 0.2+, both of which show the same problem.

To generate issue, I just uncomment the line where fugitive-gitlab.vim is loaded

" Make sure to slink this to ~/.vimrc (for vim) and ~/.config/nvim/init.vim (for neovim)

set shell=/bin/bash         " Force shell to use bash
set nocompatible            " Be iMproved, required for (n)vim
set number                  " Line numbers
set relativenumber          " Relative line numbers w.r.t the cursor

filetype plugin indent on
set expandtab               " Uses spaces instead of tabs
set tabstop     =4          " show existing tab with 4 spaces width
set shiftwidth  =4          " when indenting with '>', use 4 spaces width
set softtabstop =4          " Tab key indents by 4 spaces
set backspace   =indent,eol,start   " Make backspace work as expected
set ignorecase              " Ignore case in search results, using \C overrides this
set smartcase               " Ignores 'set ignorecase' if search contains upper case letter

if has('nvim-0.1.5')        " True color in neovim wasn't added until 0.1.5
    set termguicolors
elseif has('nvim')
    let $NVIM_TUI_ENABLE_TRUE_COLORS=1
endif

set nowrap                  " Don't wrap long lines automatically
set textwidth       =75     " Set textwidth to <n> chars, wrap after that
set formatoptions   +=t     " Automatically wrap lines after <textwidth> chars
set formatoptions   -=l     " Already long lines will also be auto-wrapped if appended to

" Further, from the wiki:
" If you want to wrap lines in a specific area, move the cursor to the
" text you want to format and type gq followed by the range.  For
" example, gqq wraps the current line and gqip wraps the current
" paragraph.

if executable('par')        " See 'par' vimcast for amazing text wrangler
    set formatprg=par
endif

" Spell checking
set spell spelllang=en_us
au BufNewFile,BufRead .shrc set filetype=sh     " Sets .shrc files to use sh syntax
au BufNewFile,BufRead *.cls set filetype=tex    " Sets .cls files to use latex syntax

if has('nvim')
    let plugfile = '~/.local/share/nvim/site/autoload/plug.vim'
    let plugin_dir = '~/.local/share/nvim/plugged'
else
    let plugfile = '~/.vim/autoload/plug.vim'
    let plugin_dir = '~/.vim/plugged'
endif

if empty(glob(plugfile))
    function GetPlugVim(plugfile)
        execute '!curl -fLo'
        \ a:plugfile
        \ '--create-dirs'
        \ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
        autocmd VimEnter * PlugInstall
    endfunction
    call GetPlugVim(plugfile)
endif

call plug#begin(plugin_dir)

" Language specific plugins
" Completions in neovim
if has('nvim')
    Plug 'roxma/nvim-completion-manager'
endif

" Snippets for code completion 
Plug 'SirVer/ultisnips'             " The snippets engine
Plug 'honza/vim-snippets'           " Snippets themselves

" Rust
Plug 'rust-lang/rust.vim'           " Rust stuff
Plug 'racer-rust/vim-racer'         " Racer in vim
Plug 'roxma/nvim-cm-racer'          " Neovim/vim8 completion for rust

" Lisp-like (e.g. Clojure)
if has('nvim-0.1.5')
    Plug 'snoe/nvim-parinfer.js'    " Lisp parens auto-adjust for nvim 0.1.5+
else
    Plug 'bhurlow/vim-parinfer'     " Vim port of nvim-parinfer.js
endif

" Color schemes
Plug 'morhetz/gruvbox'                  " Gruvbox theme for vim
Plug 'altercation/vim-colors-solarized' " Solarized theme for vim
Plug 'joshdick/onedark.vim'             " Onedark theme from Atom ported to vim
Plug 'sheerun/vim-polyglot'             " Syntax highlighting for different languages

Plug 'scrooloose/nerdtree'              " Project tree directory
Plug 'scrooloose/nerdcommenter'         " Easily comment lines
Plug 'Xuyuanp/nerdtree-git-plugin'      " Git plugin for NERDTree

Plug 'tpope/vim-fugitive'               " Git plugin for vim
Plug 'tpope/vim-rhubarb'                " Git plugin for vim - extension for Github
"Plug 'humphrey/fugitive-gitlab.vim'     " Git plugin for vim - extension for Gitlab
Plug 'airblade/vim-gitgutter'           " Git status in gutter (next to line numbers)

Plug 'itchyny/lightline.vim'            " Status line for vim

" All of your Plugins must be added before the following line
call plug#end()

colorscheme gruvbox
let g:gruvbox_italic=1  " Allows italics for gruvbox
set background=dark     " Options: [light/dark]
let g:lightline = {'colorscheme':'gruvbox'}

"colorscheme solarized
"set background=dark    " Options: [light/dark]
"let g:lightline = {'colorscheme':'solarized'}

"let g:onedark_terminal_italics=1   " Allows italics for onedark
"colorscheme onedark
"let g:lightline = {'colorscheme':'onedark'}

set noshowmode          " Status is already in lightline - no need for redundency

" Options for vim-racer
let g:racer_cmd = "~/.cargo/bin/racer"
let g:racer_experimental_completer = 1
au FileType rust nmap gd <Plug>(rust-def)
au FileType rust nmap gs <Plug>(rust-def-split)
au FileType rust nmap gx <Plug>(rust-def-vertical)
au FileType rust nmap <leader>gd <Plug>(rust-doc)

" From https://stackoverflow.com/questions/6577579/task-tags-in-vim
if has("autocmd")
  " Highlight TODO, FIXME, NOTE, BUG, etc.
  if v:version > 701
    autocmd Syntax * call matchadd('Todo',  '\W\zs\(TODO\|FIXME\|CHANGED\|XXX\|BUG\|HACK\)')
    autocmd Syntax * call matchadd('Debug', '\W\zs\(NOTE\|INFO\|IDEA\)')
  endif
endif
shumphrey commented 6 years ago

Are you sure vim-plug is managing this repo? You have a typo in the address for the plugin. Its missing an s. Certainly what you pasted isn't managing this repo, at least partly because its commented out but mostly because of that missing s.

cbcoutinho commented 6 years ago

Wow this is embarrassing - this was definitely a spelling error

🤦‍♂️

i apologize for the bug report.