Comments (12)
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.
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.
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.
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.
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.
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.
It is /bin/zsh
indeed. :)
from vim-gitgutter.
Glad we found the problem :)
It should work for you as of 00a8622.
from vim-gitgutter.
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.
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.
Sorry -- now it shows signs after saving a file.
Thank you, great job!
from vim-gitgutter.
Awesome! That fixes the issue! 🙇
from vim-gitgutter.
Related Issues (20)
- b:gitgutter_was_enabled error anytime you run `saveas newfile.txt` HOT 1
- Undefined variable: b:source_window when staging from a floating preview menu HOT 2
- g:gitgutter_close_preview_on_escape is broken when exists('*nvim_open_win') HOT 2
- vim-gitgutter clobbers v:shell_error via autocmd ShellCmdPost HOT 7
- File renames aren't handled properly HOT 13
- Error detected while processing CursorHold HOT 14
- g:gitgutter_diff_base () is invalid HOT 4
- Neovim Nightly Issue HOT 2
- Neovim now prefers extmarks to signs HOT 3
- errors when file path includes colons HOT 3
- Performance issues after base_path fix HOT 5
- Branch rename breaking installations? HOT 1
- g:gitgutter_diff_base () is invalid HOT 10
- Performance issues with big files in the repository HOT 3
- cursorline highlighting doesn't work with gitgutter HOT 3
- gutter colors not showing change on correct line HOT 1
- No hunks (file possibly recognized as binary file) HOT 5
- GitGutterLineHighlightsToggle doesn't update immediately on neovim HOT 3
- GG doesn't show file changes when in a worktree HOT 3
- key map expr needs more backslashes? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-gitgutter.