Comments (5)
@hoschi Your version text looks fine to me.
Are you using gvim or terminal vim? Terminal vim doesn't trigger FocusGained
, I believe.
Please could you show me any vim-gitgutter configuration you have in your vimrc?
Finally, does it work if you do :call GitGutterAll()
?
from vim-gitgutter.
You are right terminal vim doesn't trigger FocusGained
. Because of that, I tried gvim and was wordering why it also didn't work.
This is my config for git gutter:
" git gutter
let g:gitgutter_sign_column_always = 1
nmap <silent> ]h :<C-U>execute v:count1 . "GitGutterNextHunk"<CR>
nmap <silent> [h :<C-U>execute v:count1 . "GitGutterPrevHunk"<CR>
I updated my repo this morning and it still doesn't work with FocusGained
. When I call the function you mentioned the gutter doesn't update. Only on a write operation.
from vim-gitgutter.
Thanks for pasting your config; it's fine.
vim-gitgutter always shows the difference between the saved file and the staged file. If you have unsaved changes in Vim, calling vim-gitgutter again – either via FocusGained
or via :call GitGutterAll()
– won't change the signs. It's not (yet) a realtime diff, it's what you would get if you ran git diff
in the terminal.
So when vim-gitgutter is triggered, the signs will change only if either the git index has changed or you have saved additional changes to the working copy of the file.
Are you saying FocusGained
and :call GitGutterAll()
don't do anything for you when you have changed the git index or changed the working copy of the file?
from vim-gitgutter.
Ahhhh ok :) Sorry ^^
I thought it should refresh the signs which reflect not saved changes to my file on FocusGained
. If I save the file or change the git index it updates, so you can close the 'issue' ;) Thanks for the explanation.
from vim-gitgutter.
I'm glad we figured it out. Sorry for the confusion.
Issue #33 is about signs for unsaved changes – but I'm not sure when I'll be able to tackle it.
from vim-gitgutter.
Related Issues (20)
- Can we have gitgutter signs in a separate column? HOT 1
- `let g:gitgutter_diff_args='--cached'` Isn't Working HOT 4
- 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
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.