-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue when using the rg2vim function #1
Comments
I don't know about neovim. rg2vim() {
vim -c "$(
FL=0
while IFS=: read -r fn ln line; do
if [ "$FL" -eq "0" ]; then
printf "e %q|" "$fn"
FL=1
else
printf "tabnew %q|" "$fn"
fi
printf ":%d|" "$ln"
done < <(rg -n "$1" | peco --select-1)
)"
} So what this does is pass the first argument given to Given this slightly weird error, I could imagine that neovim does not like commands like this. Maybe you can dry-fire a command like |
Thank you for the explanation! I noticed it only happens after the first time running the command, but that command does work. ➜ .dotfiles git:(master) ✗ nvim -c "e zsh/zshenv.symlink|:123"
Alias tip: vim -c "e zsh/zshenv.symlink|:123"
➜ .dotfiles git:(master) ✗ vim -c "e zsh/zshenv.symlink|:123"
E575: Error while reading ShaDa file: mark entry at position 6053 has invalid line number
Press ENTER or type command to continue
➜ .dotfiles git:(master) ✗ nvim -c "e zsh/zshenv.symlink|:123"
Alias tip: vim -c "e zsh/zshenv.symlink|:123"
E575: Error while reading ShaDa file: mark entry at position 6074 has invalid line number
Press ENTER or type command to continue
➜ .dotfiles git:(master) ✗ nvim -c "e zsh/zshenv.symlink|:123"
Alias tip: vim -c "e zsh/zshenv.symlink|:123"
E575: Error while reading ShaDa file: mark entry at position 6073 has invalid line number
Press ENTER or type command to continue I'll spend some time looking into this, also for curiosity, do you use still use this function or do you use another method of getting to files? |
I still use it from time to time. This is most likely not the right way to do it, though. Regarding your |
I get this issue whenever I use your rg2vim function
E575: Error while reading ShaDa file: mark entry at position 5802 has invalid line number
I use neovim, not sure if that changes anything.
By the way thank you so much for this function, I was originally going to over-engineer some kind of weird parsing tool https://github.com/partounian/srg
The text was updated successfully, but these errors were encountered: