The ls command inside Vim shows a weird result

When trying to save the file in vim, I used the ls command to see the folder I want to save to. After using the ls command, I got the following result:

1% a + "[No Name]" line 1

Obviously not the contents of the folder. Can someone tell me why this is happening and how to fix it? Thanks:)

+8
vim
source share
2 answers

Try these two commands

:help :ls :!ls 
+14
source share

:!ls is a call to the ls command in the list of shell == files in the working directory.

:ls is a built-in Vim command that displays the contents of the buffer list == list of your open files.

+9
source share

All Articles