Closed soheilpro closed 3 years ago
oh right now it only looks for vim
, I will also have it check vi
.
I changed my EDITOR to "vim" but still have the same problem.
I just pushed a fix about 10 seconds ago ("version": "1.1.10"
) Let me know if that fixes it!
One thing I'm unsure of: it logs a few messages after opening the editor, which appears in vim on top of vim
's text.
Is it better if I silence the logs for vim/vi?
The new version works. Thanks.
Yeah, I noticed that too. I think it's better to open the editor after you've fetched the repo.
Another issue that I'm having is that I only see the README file and no other files.
It would be a lot slower to wait for the entire repository to download, but I see what you're saying – it only shows the README file because it hasn't finished downloading the rest of the repository by the time vim opens and vim doesn't automatically refresh the directory listing (unlike VSCode/Sublime Text/others)
I guess what I could do instead is make it open the readme on vim by default (or linked file), so that if you want to go to a different file, when you go up, its probably loaded most of the files by then.
If it delayed opening until the repository is completely finished, it wouldn't be fast enough I think
I'm personally fine with waiting for the whole repo to download before opening the editor.
The current behavior is a bit confusing.
I tried it with "version": "1.1.15"
and the issue still persists when $EDITOR
is vim
. For now i'm just using git peek -e code
@rushi can you screenshot/paste terminal output? I'm not sure how to reproduce.
One issue I'm seeing on macOS is that $EDITOR
isn't propagating to the node
process. It sounds like something related to System Integrity Protection, which is unfortunate.
@rushi can you screenshot/paste terminal output? I'm not sure how to reproduce.
This is how it looks like when EDITOR=vim
for git peek https://github.com/Jarred-Sumner/git-peek
Technically the editor does open up, but the output is still on the CLI so it interferes with vim, and the vim UI doesn't refresh when new directories and such are fetched
One issue I'm seeing on macOS is that
$EDITOR
isn't propagating to thenode
process. It sounds like something related to System Integrity Protection, which is unfortunate.
/tmp
○ export EDITOR=code
/tmp
○ node test.js
process.env.EDITOR is code
/tmp
○ export EDITOR=vim
/tmp
○ node test.js
process.env.EDITOR is vim
/tmp
○ node -v
v12.19.1
I justed on my environment and it's definitely being picked up by node v12
@rushi @soheilpro I added a --wait
flag which waits for the entire repository to finish downloading & extracting before opening the editor. This flag is always enabled if the chosen editor is vi
/vim
, but otherwise defaults to disabled. So it should just work the way you expect now.
I justed on my environment and it's definitely being picked up by node v12
Hmm, I think you're right. I read this somewhere when investigating an $EDITOR
issue earlier. In any case, I manually tested it in vim after setting $EDITOR
to vim and it seems to work right
Please re-open the issue if you're still seeing any problems.
This is a great idea, thanks.
But it doesn't work on my macOS with Homebrew-installed vim: