!ls question.
#28582
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
|
Beta Was this translation helpful? Give feedback.
-
Hello, I am a noob at neovim and have a question regarding using external commands, I edited init.vim to use powershell with the following:
set shell=powershell.exe
set shellxquote=
let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command
let &shellquote = ''
let &shellpipe = '| Out-File -Encoding UTF8 %s'
let &shellredir = '| Out-File -Encoding UTF8 %s'
which works but when I use ":!ls" to do a directory listing the result has blank lines in between every item, like this sample;
d-r--- 30/03/2024 15:04 Links
d-r--- 30/03/2024 15:04 Music
d-r--- 30/03/2024 15:05 OneDrive
d-r--- 27/04/2024 23:24 Pictures
d-r--- 03/04/2024 19:24 Saved Games
d----- 30/03/2024 19:02 scoop
But when I do a retrieve of the same command with ":r !ls" the directory listing is inserted into the file with no extra lines like this;
d-r--- 30/03/2024 15:04 Links
d-r--- 30/03/2024 15:04 Music
d-r--- 30/03/2024 15:05 OneDrive
d-r--- 27/04/2024 23:24 Pictures
d-r--- 03/04/2024 19:24 Saved Games
d----- 30/03/2024 19:02 scoop
How can I compact the result from the external ls command? I feel like extra new line characters or something are being added but have no idea where to diagnose that and have had no luck searching for a similar Q&A on the internet. Many thanks for any advice :D
Beta Was this translation helpful? Give feedback.
All reactions