powershell-profile
powershell-profile copied to clipboard
vim editor config
i am not sure if its only with my system but when i typed "vim" i am getting the following error
i am not sure if its only with my system but when i typed "vim" i am getting the following error
its working in normal powershell but launching it with windows terminal doesn't seem to work does they have different commands for execution ?
In this block of Chris's Script he is checking to see what is installed on your system to determine which editor to use.
if (Test-CommandExists nvim) { $EDITOR='nvim' } elseif (Test-CommandExists pvim) { $EDITOR='pvim' } elseif (Test-CommandExists vim) { $EDITOR='vim' } elseif (Test-CommandExists vi) { $EDITOR='vi' } Set-Alias -Name vim -Value $EDITOR
The options are Neovim https://github.com/neovim/neovim/wiki/Installing-Neovim
(I can only assume pvim is parasitic vim, and it uses the nimble library) https://github.com/paranim/pvim
vim https://www.vim.org/download.php -or- winget install vim.vim
vi (I think you need to install cygwin to get this?)
So I think the best options would be to get neovim or vim installed.
@rajorshi-mandal Additionally, you could add your own editors into the list that would launch as a shortcut when you type vim Please note for anything outside of code or notepad you would need to add those to your PATH.
$EDITOR='nvim'
} elseif (Test-CommandExists pvim) {
$EDITOR='pvim'
} elseif (Test-CommandExists vim) {
$EDITOR='vim'
} elseif (Test-CommandExists vi) {
$EDITOR='vi'
} elseif (Test-CommandExists code) {
$EDITOR='code'
} elseif (Test-CommandExists notepad) {
$EDITOR='notepad'
} elseif (Test-CommandExists notepad++) {
$EDITOR='notepad++'
} elseif (Test-CommandExists sublime_text) {
$EDITOR='sublime_text'
}
Set-Alias -Name vim -Value $EDITOR
@rajorshi-mandal Did this resolve your issue? If Not Please share what error messages you are getting now.
The Alternative if you do not mind having a "vim" alias, is that you can remove or comment out that chunk of code or at minimum the Set-Alias Line.
For all the EDITOR messages, just put this on line 133 just before the 'if (Test-CommandExists nvim) {'
So the editor will be notepad if none of the other commands exist.
$EDITOR="notepad.exe"
In this block of Chris's Script he is checking to see what is installed on your system to determine which editor to use.
if (Test-CommandExists nvim) { $EDITOR='nvim' } elseif (Test-CommandExists pvim) { $EDITOR='pvim' } elseif (Test-CommandExists vim) { $EDITOR='vim' } elseif (Test-CommandExists vi) { $EDITOR='vi' } Set-Alias -Name vim -Value $EDITOR
The options are Neovim https://github.com/neovim/neovim/wiki/Installing-Neovim
(I can only assume pvim is parasitic vim, and it uses the nimble library) https://github.com/paranim/pvim
vim https://www.vim.org/download.php -or- winget install vim.vim
vi (I think you need to install cygwin to get this?)
So I think the best options would be to get neovim or vim installed.
Thanks @TheyCallMeZ i had same issue #19 and as you recomended 'neovim or vim' could resolve that problem and i did 'choco install neovim' and Wallah its worked!
heres the SS
Took @TheyCallMeZ snippit to expand the editors to fix this issue in commit 7381f33