GithubHelp home page GithubHelp logo

No signs are visible about vim-gitgutter HOT 12 CLOSED

airblade avatar airblade commented on May 21, 2024
No signs are visible

from vim-gitgutter.

Comments (12)

ati avatar ati commented on May 21, 2024

Same thing here.
Vim 7.3, Mac OS X 10.7

I can place signs manually (:sign place ...), access plugin commands (e.g. ToggleGitGutter) but GitGutter doesn't work.

from vim-gitgutter.

kearnh avatar kearnh commented on May 21, 2024

Are you running Windows and/or have you configured git to show colored diffs? (I had both these problems)
I fixed it by changing the line the s:run_diff function:

diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim
old mode 100644
new mode 100755
index d6b31a5..72bad36
--- a/plugin/gitgutter.vim
+++ b/plugin/gitgutter.vim
@@ -103,10 +103,10 @@ endfunction
 " Diff processing {{{

 function! s:run_diff()
-  let cmd = 'git diff --no-ext-diff -U0 ' . shellescape(s:current_file()) .
+  let cmd = 'git diff --no-ext-diff -U0 --no-color ' . shellescape(expand('%')) .
         \ ' | grep -e "^@@ "'
   let diff = system(s:command_in_directory_of_current_file(cmd))
   return diff
 endfunction

from vim-gitgutter.

daGrevis avatar daGrevis commented on May 21, 2024

Tried it — no luck!

This is my .gitconfig:

[user]
    name = Raitis Stengrevics
    email = [email protected]
[core]
    editor = vim
[color]
    ui = true
    diff = always
    editor = vim
[alias]
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset <%an>' --abbrev-commit --date=relative
    status = status -sb
    stat = status
    co = checkout
    new = !sh -c 'git checkout -b $0 && git push -u origin $0'
[rerere]
    enabled = 1
[merge]
    tool = vimdiff

This line is in my .zshenv, if it is relavant somehow.

alias diff='colordiff -u'

I'm using Arch Linux. Maybe plugin can't find my git or diff?

 % which git
/usr/bin/git
 % which diff
diff: aliased to colordiff -u
 % which colordiff
/usr/bin/colordiff

Thanks!

from vim-gitgutter.

airblade avatar airblade commented on May 21, 2024

Thanks for posting your configs – very helpful.

I suspect the problem is related to your diff alias. Please could you remove it, relaunch your shell/vim, and try again?

from vim-gitgutter.

daGrevis avatar daGrevis commented on May 21, 2024

Removed alias for diff. Now diff points to /usr/bin/diff.

Sorry, but it doesn't help.

Should I open vim in dir where .git is or I can open it in any place where Git repo exists?

from vim-gitgutter.

airblade avatar airblade commented on May 21, 2024

You open vim anywhere at all, even outside your repo.

In Vim what does :echo &shell give you? If it's not /bin/bash then I know what the problem is and I'm working on the fix. If it is, then I'll have to keep thinking...

from vim-gitgutter.

daGrevis avatar daGrevis commented on May 21, 2024

It is /bin/zsh indeed. :)

from vim-gitgutter.

airblade avatar airblade commented on May 21, 2024

Glad we found the problem :)

It should work for you as of 00a8622.

from vim-gitgutter.

ati avatar ati commented on May 21, 2024

Doesn't work for me yet :/

:echo &shell
/bin/bash
03:41:32 ati@192 ~/.vim/bundle$ cat ~/.gitconfig 
[user]
    name = Alexander
    email = [email protected]

[alias]
    lol = log --graph --decorate --pretty=oneline --abbrev-commit
    lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
    puls = pull origin spring-2012
[color]
    branch = auto
    diff = no
    interactive = auto
    status = auto
"Pathogen
set nocp
filetype off
" To disable a plugin, add it's bundle name to the following list
"let g:pathogen_disabled = ['syntastic']
call pathogen#infect()

syntax off
set number
set cursorline
filetype on
filetype plugin on
filetype indent on

set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set bs=2

set autoindent
set smartindent

set nohlsearch
set incsearch
set ignorecase
set smartcase

" This will set your path variable to current directory (from which you
" launched vim) and to all directories under current directory recursively.
" use find and sfind to open files
set path=$PWD/**

if has("gui_running")
"   set transparency=5
    set guioptions-=T
    colorscheme bclear
    set number
else
    set t_Co=256
    " colorscheme desert256
    " colorscheme railscasts
    " colorscheme xoria256
    colorscheme lucius
endif

" set shortmess=atI
set ruler
set scrolloff=3
set wildmenu
set wildmode=list:longest
set hidden
set pastetoggle=<F2>
set mouse=a
set mousemodel=extend
" MAC OS vim 7.3+
set clipboard=unnamed

" don't scan included files for autocompletion
set complete -=i

nnoremap ' `
nnoremap ` '
map <F1> <esc>
nnoremap <Tab> �w

" taglist plugin settings
nnoremap <silent> <F5> :TagbarToggle<CR>
"let tlist_php_settings = 'php;c:class;f:function;c:constant'
"let Tlist_Exit_OnlyWindow = 1
"let Tlist_GainFocus_On_ToggleOpen = 1


" status highlighting from
" http://www.reddit.com/r/vim/comments/gexi6/a_smarter_statusline_code_in_comments/
" end of status highlighting code

"
" :autocmd BufRead *.php set tags=$HOME/ivacy-tags
autocmd BufRead,BufNewFile *.tpl source $VIMRUNTIME/ftplugin/html.vim

autocmd FileType html,eruby,mako let b:closetag_html_style=1
autocmd FileType html,xhtml,xml,htmldjango,jinjahtml,eruby,mako source ~/.vim/bundle/closetag/plugin/closetag.vim

"autocmd FileType smarty source $VIMRUNTIME/macros/matchit.vim
autocmd BufRead,BufNewFile *.rb set filetype=ruby
"
autocmd BufReadPost *
  \ if line("'\"") > 0 && line("'\"") <= line("$") |
  \   exe "normal g`\"" |
  \ endif

if strlen ( finddir ('~/.vim-tmp' )  ) == 0
    silent execute '!mkdir ~/.vim-tmp'
endif

set directory=~/.vim-tmp
"

highlight LineNr ctermbg=none ctermfg=65
highlight StatusLine ctermbg=59
highlight StatusLineNC ctermbg=236
iab <expr> hdts ':' . strftime('%A, %e %B %Y %H:%M') . ', ' . hostname()

let g:syntastic_enable_signs=1

from vim-gitgutter.

airblade avatar airblade commented on May 21, 2024

Oh dear.

Does it work by any chance if you comment out let g:syntastic_enable_signs=1 at the end of your vimrc?

from vim-gitgutter.

ati avatar ati commented on May 21, 2024

Sorry -- now it shows signs after saving a file.
Thank you, great job!

from vim-gitgutter.

daGrevis avatar daGrevis commented on May 21, 2024

Awesome! That fixes the issue! 🙇

from vim-gitgutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.