15
Condor
3d

*gets annoyed by how vi command in Ubuntu WSL points to vim*
To be clear, that's due to update-alternatives in Ubuntu, not WSL specifically.
*le me ducking how to install vi instead, because vim in WSL has scrolling issues*

"install vi ubuntu"
> How do I install and get started with vim/vi? - Ask Ubuntu
> apt - Vim installation in Ubuntu 14.04 - Ask Ubuntu
> Ubuntu Linux: Install vim Text Editor - nixCraft

-.- I'm not looking for vim ffs, I already have that installed.

"install vi ubuntu -vim"
> Same fucking results

"!g install vi ubuntu -vim"
> Installing the VI Perl Toolkit from Source Code—Linux - VMware
> FedoraDirectoryServerClientHowto - Community Help Wiki - Ubuntu …
> Learn How To Use Linux vi Editor And Its Commands - LinOxide

Oh for fuck's sake!!!
So here's my question because apparently search engines clearly can't point me to it, and Ubuntu doesn't seem to have vi as "vi" in their repositories either. Do our Canonical overlords allow people to actually make /usr/bin/vi actually be fucking vi?

Comments
  • 3
    Look for an alias in default .bashrc 😉
    (At least that's how it is in Manjaro ¯\_(ツ)_/¯ )
  • 4
    @Brosyl I'm using zsh here... The file /usr/bin/vi is described as follows:
    $ file /usr/bin/vi
    /usr/bin/vi: symbolic link to /etc/alternatives/vi

    As for that alternatives file:
    $ file /etc/alternatives/vi
    /etc/alternatives/vi: symbolic link to /usr/bin/vim.basic

    Hence why it's an issue with update-alternatives. Just looked through "apt search vi" output in vim as well and it doesn't seem like Canonical provides vi at all. Fucking amazing -.-

    Thanks for the suggestion though! I really appreciate it :)
  • 3
    Maybe this might help? https://stackoverflow.com/q/...
    (Have a look at the comments to the question, apparently vi comes preinstalled by default in standard ubuntu - not sure about WSL though)
  • 3
    @endor Perfect!! I didn't even know that Ubuntu had busybox available. Issuing busybox vi did the trick. I'll update that symlink later as well. Thanks a lot! ^^
  • 1
  • 3
    @sudo-rm-rf thanks, that looks like a more permanent solution. Just applied it and vi is now installed as its own package.

    Now the question is, WHY THE FUCK DID CANONICAL CALL THIS SHIT NVI?! Who would look at N of all places when they have to go through 100k lines from "apt search vi"? For fuck's sake, Canonical sure works in mysterious ways... Anyway, solved now. Thanks man :)
  • 0
    I haven't experienced these scrolling issues you speak of, is it a buffer size issue?
  • 2
    @beegC0de it's introduced in Insider Preview.. but apparently most of the Microsoft chaps are currently on vacation so they didn't fix it yet.

    https://github.com/Microsoft/...
    Which is (obviously, it's always a dupe) duplicate of:
    https://github.com/Microsoft/...

    22 days in and still no fix.. fix-inbound, really Microsoft?!
  • 0
    Well, their README.md has an appropriate remark:

    "This repo is monitored by the Windows Console engineering team, and provides a best-effort, informal support option for the community. Your patience is appreciated!"
  • 2
    @AgeOfRanterance As mentioned in the rant, this is not a WSL issue other than the fact that Vim renders incorrectly in Insider Previews for which 4 issues have been filed so far.

    As for the Vim vs Vi issue which is due to Ubuntu (which again got mentioned in the rant) that's already solved by installing nvi.

    @pily I've removed nvi just now (will install soon after because that's the solution) and got returned /usr/bin/vi which as mentioned before once again, is linked to alternatives (vim).

    This issue is solved and if I could close comments here, I would without a second thought.
  • 1
    @Condor yeah, I missed one of your last comment where you said you solved it 😅 that's why I've removed the post. Sorry for the repetition 🙂
  • 1
    Also I just found out on Wikipedia that nvi is not even vi, but a reimplementation to get around some licensing issues and that it's the default for BSD systems. So that really is another program
Your Job Suck?
Get a Better Job
Add Comment