Giter Site home page Giter Site logo

Comments (7)

TheyCallMeZ avatar TheyCallMeZ commented on July 24, 2024 2

@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

from powershell-profile.

rajorshi-mandal avatar rajorshi-mandal commented on July 24, 2024

i am not sure if its only with my system but when i typed "vim" i am getting the following error Screenshot (1834)

its working in normal powershell but launching it with windows terminal doesn't seem to work does they have different commands for execution ?

from powershell-profile.

TheyCallMeZ avatar TheyCallMeZ commented on July 24, 2024

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.

from powershell-profile.

TheyCallMeZ avatar TheyCallMeZ commented on July 24, 2024

@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.

from powershell-profile.

bertman80 avatar bertman80 commented on July 24, 2024

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"

from powershell-profile.

itsRealGray avatar itsRealGray commented on July 24, 2024

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
Annotation 2023-01-19 030346

from powershell-profile.

ChrisTitusTech avatar ChrisTitusTech commented on July 24, 2024

Took @TheyCallMeZ snippit to expand the editors to fix this issue in commit 7381f33

from powershell-profile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.