nus-cs2030 / 2122-s2

CS2030 repository and wiki for AY 2021/2022 Sem 2
MIT License
0 stars 0 forks source link

Vim and ubuntu #12

Open nuzzul opened 2 years ago

nuzzul commented 2 years ago

Summary

I downloaded vim 8.2 and when i check vim -version on powershell it shows version 8.2. However when on Ubuntu it shows 8.0. Also, im not able to launch WSL as the wiki explained i.e. "windows logo + R" , type "Ubuntu". It says theres no such name so i have to open ubuntu by opening it. Lastly, the working with .vimrc step, im not able to find the path as theres only the ext4 in my localstate. i followed the steps properly so im not sure what is wrong.

Description

Describe the problem and how one can replicate this problem

Screenshots (if any):

Insert Images here if necessary 2022-01-18 (1)

YeoShenKai commented 2 years ago

You're not alone - I also have the same issue on the vim version. Mine's stuck on version 8.0, despite me doing a clean reinstall. It works, though, and I hope version 8.0 would suffice for CS2030. I also have the issue of not being able to open Ubuntu using "win + R" and "Ubuntu". Instead, I have to type "C:\Ubuntu.appx", which then brings me to another screen that says "Ubuntu 18.04 LTS is already installed". image To get around this issue, I'm currently launching Ubuntu using the application shortcut instead of "win+R".

danqiye1 commented 2 years ago

Hi. If you are upgrading vim on Ubuntu you need to start the Ubuntu's bash terminal (not powershell or cmd.exe), then install with:

# To sync the package index
sudo apt update
# Upgrade vim in Ubuntu after syncing
sudo apt upgrade vim

You might only get up to version 8.1 for Ubuntu 20.04 for vim, but I don't think it matters that much since its just a text editor.

For starting Ubuntu's bash terminal, I think there might have been some changes to how Windows activate it since this wiki was last written. I tested it and it seems that you can open your Ubuntu terminal with "Win + R" and typing bash or wsl instead.

Powershell is a terminal that controls your Windows environment. You can enter WSL bash terminal by typing wsl in powershell, but usually I prefer the above method because the highlighting in powershell is quite bad.

nuzzul commented 2 years ago

hi then what about the .vimrc issue?

danqiye1 commented 2 years ago

How did you get to the folder in your File Explorer? Technically after you opened your wsl terminal, just navigate to your home directory and execute explorer.exe:

~$ cd
~$ explorer.exe .

Then copy the .vimrc from github over to that location.