Closed GordianDziwis closed 5 years ago
Which version of nvimpager are you using? What is in the config file ~/.config/nvimpager/init.vim
? Is it a symlink?
NVIM is v0.3.2-dev and nvimpager is current develop. The config file does not exist.
Yes nvimpager should use its own config file. What do you see if you execute bash -x ./nvimpager some-file
?
Having same issue.
Then I have the same questions (and more) for you:
~/.config/nvim
or ~/.config/nvimpager
? Is any of these a symlink?bash -x nvimpager some-file
?nvimpager -v
: nvimpager v0.5.1-90-g3bb4f16echo foo | nvimpager
~/.config/nvim/init.vim
~/config/nvim/init.vim
bash -x nvimpager .aliases
:
There's more but hopefully that's enough output.
I'm guessing that we need to source the vim-plug file, and more generally, any file in vim's autoload folder. For me vim-plug is location is at: ~/.local/share/nvim/site/autoload/plug.vim
@cjbassi I think I found your issue. Can you try the branch fix/issue-8
? You will have to clone the repository but you can run nvimpager directly from there: PAGER=~/where/ever/nvimpager
.
I assume the errors will go away with this but nvimpager might not yet load you default nvim settings because:
You said you symlinked ~/.config/nvim/init.vim
to itself, that sounds strange. And the debug output suggests that there is no file /home/cjbassi/.config/nvimpager/init.vim
because of these two lines
+ [[ ! -r /home/cjbassi/.config/nvimpager/init.vim ]]
+ rc=
compare https://github.com/lucc/nvimpager/blob/3bb4f16d8faca76715d4c39d8bc8eb5199476c39/nvimpager#L64-L65
If you really want to use the default nvim settings with nvimpager (I don't do it because I do not need all these plugins in nvimpager) you should probably symlink ~/.config/nvimpager
to ~/.config/nvim
and not just the init file itself.
@BonaBeavis the branch fix/issue-8
might also solve the problem for you. Can you try it?
Thanks for the quick response. Few things:
Running nvimpager from the fix/issue-8
branch doesn't error anymore, but it loads with default neovim settings I think.
Symlinking ~/.config/nvimpager
to ~/.config/nvim
causes the errors to appear again when running nvimpager from the fix/issue-8
branch.
Also, my init.vim
file isn't symlinked to itself, although it may look like it, because there's a dot in front of the config
folder in the first path but not the second :D
Thanks!
@cjbassi Sorry I missed that dot. I have the following questions/assumptions, maybe you can answer and confirm or reject them:
~/.config/nvimpager/init.vim
&rtp
. If I symlink the whole folder I don't get errors (and I also use vim-plug). So:~/.config/nvim/init.vim
?$IMINIT
or $EXINIT
set in your environment? To what value?init.vim
but I'm not sure if nvimpager should default to that or not.~/.local/share/nvim/site/autoload/plug.vim
. I don't do anything explicit in my init.vim
to load it. I assume it's loaded automatically by neovim since it's located in the autoload
folder.Do you have vim-plug installed to the same place as me?
init.vim
file as nvim. That is a design desicion and will not change.~/.config/nvimpager -> ~/.config/nvim
and ~/.local/share/nvimpager/site -> ~/.local/share/nvim/site
it should work. Can you confirm that?~/.local/share/nvim/plugins/vim-plug
where all the other plugins are. I add this folder to the &rtp
in my init.vim
.I just checked the man page and it already documents these folders. Was the manpage of any help or should it be rewritten?
Cool that makes sense. So I symlinked both the .config
and the .local/share
folder and now it loads my settings, so things are working as expected now! Thanks!
The man page looks good, if you want you could maybe mention how to load the the default init.vim
file by setting up symlinks since that might be a common thing.
So I've run into a new issue where running nvimpager on a file that is too long to print to stdout causes neovim to load the file and display it correctly, but it becomes unresponsive as soon as I press either the j
or k
keys and I have to force quit the application. All other movement commands work fine, but not those two. If you want I could make an new Issue for this.
So it turns out that having
nmap <silent> j gj
nmap <silent> k gk
was causing the issue, although I'm not sure why.
Edit: changing nmap
to nnoremap
fixed it!
I think this is resolved by 836962f. If anybody has trouble when trying to use the default nvim config files please read https://github.com/lucc/nvimpager/blob/develop/nvimpager.md#CONFIGURATION before reporting.
Should not nvimpager use its own config?