Closed farbodsz closed 3 years ago
init.vim
from.dotfiles
seems to be the only affected file
How strange. Please could you tell me what :echo gitgutter#utility#is_active(bufnr(''))
produces when you have this file open?
Please could you tell me what
:echo gitgutter#utility#is_active(bufnr(''))
produces when you have this file open?
It outputs 1
(which is the same output I get as for the files that don't display this issue)
Thanks. I have no idea what's wrong so perhaps you could turn on logging (let g:gitgutter_log=1
), reproduce the problem, then post the file gitgutter.log
which will be in gitgutter's directory.
Okay thanks - I've produced the gitgutter.log file.
I opened up files 3 times:
init.vim
from the .config
folder (symlink)init.vim
from my .dotfiles
folder.dotfiles
folderI see you use mkview
and loadview
, which can cause surprising behaviour if you change a mapping.
Please could you delete any view file for your non-symlinked init.vim
and try again?
Yep, removing mkview
and loadview
fixed the problem!
I'll probably just remove them from my init.vim
since I don't need my remember_folds
autogroup that much anyway.
Thanks!
Great!
24cc47789557827209add5881c226243711475ce
NVIM v0.4.4
Summary
My issue is about
<Plug>(GitGutterPrevHunk)
/<Plug>(GitGutterNextHunk)
mappings not working ininit.vim
, although they do work when opening a symlink toinit.vim
.My setup
In my Neovim configuration, I have sym-linked files in the
~/.config/nvim
directory to~/.dotfiles/neovim/.config/nvim
. My.dotfiles
directory is a git repo (can be found here if needed):I also have the following gitgutter configuration:
The issue
If I
cd
into the.config/nvim
directory and openinit.vim
(a symlink), I am able to use my[h
and]h
mappings to navigate hunks. Gitgutter works great here.However, if I open
init.vim
from.dotfiles/neovim/.config/nvim
, using the hunk mappings does nothing (no message at the bottom either - it's as if they weren't mapped). Both maps are set though - running:map [h
returned:What is working
After opening
init.vim
from.dotfiles
(not the symlink)...:GitGutterPrevHunk
/:GitGutterNextHunk
:call gitgutter#hunk#prev_hunk(1)
which works perfectly fine<leader>hs
in a file and it will stage it, as expected)..dotfiles/neovim/.config/nvim
, soinit.vim
from.dotfiles
seems to be the only affected file.