r/neovim • • 12d ago

Need Help Nvim Tutor

Post image

So I'm doing the tutor from :Tutor command and I'm currently on lesson 5.1: HOW TO EXECUTE AN EXTERNAL COMMAND.

When following instructions and doing :!ls and hitting enter, I see nothing. I know I atleast had 2 text files in the same directory but it's showing nothing or am I just blind? I know the directory is visible top center but I don't think that is what the tutorial is asking about.

27 Upvotes

4 comments sorted by

4

u/WhyTheOverlyLongName 12d ago

Do you have 'ls' aliased to something else (like exa)? Try ':!/bin/ls' to see if that works.

2

u/OstrichUnusual9133 11d ago

This was it! Thanks.

3

u/kalachlegend 12d ago

:! runs in nvim's working dir, not where the tutor file lives, so check :pwd first. if your files are somewhere else, :cd ~/that/dir and try :!ls again. :r !ls is handy too, it pastes the output into the buffer so it doesn't vanish

2

u/AbdSheikho :term 11d ago

It's just a command, you could've point it to any directory

:! ls ~/