Vim with Powershell

后端 未结 12 426
梦毁少年i
梦毁少年i 2020-12-07 12:42

I\'m using gvim on Windows.

In my _vimrc I\'ve added:

set shell=powershell.exe
set shellcmdflag=-c
set shellpipe=>
set shellredir=>

function!          


        
12条回答
  •  有刺的猬
    2020-12-07 13:11

    Interesting question - here is something else to add to the confusion. Without making any changes to my .vimrc file, if I then run the following commands in gvim:

    :set shell=powershell.exe
    :set shellcmdflag=-noprofile
    :echo system("dir -name")
    

    It behaves as expected!

    If I make the same changes to my .vimrc file, though (the shell and shellcmdflag options), running :echo system("dir -name") returns the nonsense characters!

提交回复
热议问题