antonmedv/walk

Can't open files in vim

PavlosCh opened this issue · 10 comments

This might be a user error but it's not obvious to me from the documentation how to open a file.
I have added both exports below to my bashrc.

export LLAMA_EDITOR=vim
export EDITOR=vim

I am assuming we navigate to a file and hit enter? Nothing seems to happen thought when I hit enter.
I am using Ubuntu v18 if that might have an impact.

Thanks in advance!

Can’t tell what’s wrong. Can you try to debug? Without it can’t fix it)

I have the same issue for vim and code -w, I'm using fish as my command line shell.

Could you please instruct me where to look or which file I should monitor for debugging the events that are not behaving as expected?

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

$ fish -v
fish, version 3.3.1

We need to add debug logs in cmd section. On opening there should be some error.

I was experiencing the same when installing the package via snap.
After downloading & building it manually, opening files in vim works!

  • fish version: 3.1.0
  • llama version: 1.4.0
  • Environment variable: EDITOR=vim

Had same issue with Ubuntu 23.04 when installed with snap and llama: v1.4.0.
After remove it from snap and installed via go, works.

Wame problem here, can't open files with any editor (tried vim, nvim, subl).
Installation from snap, Ubuntu 20.04.

One cause might be the difference between shell variables and environment variables. If EDITOR is set in a .zshrc file or similar the snap won't see that since it starts it's own shell.

~ echo $EDITOR
nvim
~ env | grep EDITOR  # notice there is nothing returned
~ snap run --shell walk
# we drop down into snaps shell here
user@host:/home/user$ echo $EDITOR # notice there is nothing returned
user@host:/home/user$ env | grep EDITOR
user@host:/home/user$ exit
# back to normal shell
~ export EDITOR=nvim
~ snap run --shell walk
user@host:/home/user$ echo $EDITOR
nvim

The next thing to figure out is how to expose the editor. My default snap doesn't have access to vi let alone neovim or my dotfiles.

From inside the snap shell:

user@host:/home/user$ vi
bash: /usr/bin/vi: Permission denied

I don't think this issue should be closed @antonmedv. I've pointed out how to get the environment variable into walk but in the isolated snap environment the editor can't be launched with the current configuration.

Had same issue with Ubuntu 23.04 when installed with snap and llama: v1.4.0. After remove it from snap and installed via go, works.

It worked for me, thanks! I think it's worth adding this to the BKM section somewhere

Yeap. it looks like this is a restriction of snap platform. And getting --classic snap is difficult. Adding all the permissions for snap is not possible (vim, vim files and any other editor in EDITOR var).

So I'm thinking to delete snap distribution of walk.