have problems installing plugins in neovim/vim - neovim

Whenever i install any plugin in neovim/vim, the commands don't work, neovim/vim gives me the same error saying that the command that the plugin has isn't a command. Am i doing something wrong?
For more info, i use windows 10 (want to switch to linux but i don't have a computer of my own to do so). I checked everything i installed, they have a windows version, they have instructions on how to download it on windows, i followed them, but the plugins still refuse to work.
The first thing i installed is vim-plug. But no command i enter works.
I tried re-installing, but that doesn't work either.

You have first to install vim-plug.
On Windows 10 you have to start a powershell (WinpowershellEnter) run the following command:
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
ni "$(#($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force
You need to have the following lines in your ~\AppData\Local\nvim\init.vim
call plug#begin()
Plug 'nvim-tree/nvim-web-devicons' " optional, for file icons
Plug 'nvim-tree/nvim-tree.lua'
call plug#end()
You need to start Neovim and run:
:PlugInstall
You need to restart Neovim

Related

Strange vscode issue in WSL

I've been trying to set up the vscode code . shortcut to work in WSL. Following the instructions from the vscode website, I reinstalled vscode in windows, reinstalled the Remote-Wsl extension, made sure it was in my System Path, and tried running code . in the WSL linux distro terminal. I get the message instructing me to install it on the windows side, and asking me if I want to continue. I hit yes, but it doesn't create the code server folder in my home directory. Typing code . again does the same thing.
Does anyone know why this may be?
This is the output text:
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the code command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N]
The error message isn't just pointing out that you need to install the Windows version, but it indicates that you have the Linux version installed in WSL and should remove it.
From that, it sounds like at some point you may have installed the Linux version of VSCode in WSL, and that one is taking priority. You'll need to uninstall it in order to run the Windows version of VSCode with the "Remote - WSL" extension.
You don't mention what distribution you are running, but if it is Ubuntu, try:
sudo apt remove code # or
sudo apt remove code-insiders
Also see the uninstall doc from Microsoft.

cant open GHCi with ghci command in command prompt

I am about to learn Haskell, (maybe, if I can get the program to work) I am working along with the book,"Learn you a Haskell for great good". I did some DOS in 80's a few weeks of COBAL in the 90's, so absolute noob.
I have loaded chocolatey into powershell in windows 10 as an administrator, that worked, entered choco install haskell-dev haskell-stack. That worked. ran refreshenv, that worked. then rebooted computer, went to command prompt and entered ghci [return] and is says no file found. then tried installing -dev and -stack with --force command, and that worked in case didnt take the first time. went to command prompt ghci nothing. reboot, command prompt then ghci [return] cant find file. ugh. any ideas?
My Haskell notes say a fresh installation goes like this:
Install chocolatey as administrator. There should be no errors returned. Run 'choco' to ensure that the installation worked.
Install stack
choco install haskell-dev
refreshenv
On Windows, the new compiler is stored here: C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.10.1\bin.
If it does not work as the default compiler, it could be masked by an earlier entry in the path list.
When you run which, PowerShell get-command what does it return? What is your path set to?
If no joy, you could search for an online Haskell REPL. Try this one:
https://replit.com/languages/haskell. You can enter code on the left hand side, and run it, or start the REPL with ghci on the right hand side. It's a bit clunky by comparison to a full IDE, but perhaps enough to get started with.

Powershell commands/scripts not actually running

I am trying to install Emscripten on my computer, and I have run into trouble getting Emscripten actually installed.
I am using the same commands as can be found on the project webpage, but when I try to run
emsdk install latest
Powershell (which is what I am using, but the basic command prompt is behaving the same way) doesn't do anything at all - it just returns without installing anything.
For reference, I have installed Emscripten on this same computer before, but decided to try and do a fresh install of Emscripten after running emsdk activate latest decided to "stop working" as well (whereas it worked just fine last week) - running the command, Powershell simply returned without actually doing anything.
Any ideas on what to check to see why these commands don't seem to run?
I think I solved it. When running the install command in Powershell ISE, it threw the error "Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640"
despite me having Python installed. Changing the order of my PATH variables to set my Python install directory above the Winapps directory solved the issue with running the install command.

ionic install fails on fsevents on Windows

I have tried to install ionic on Windows but installation has failed. What should I do?
I have tried more than 20 times but still I got the same problem.
Here I have attached the screenshot for this
Entered commands:
npm install -g cordova
npm install -g ionic
Note: this one windows server machine
My guess is that the NPM global path has not been added to your windows path.
These are the steps to try:
First verify that the command just installed can run. The output contains the full path to the command installed, just copy and paste it to the command line. In your case it might be something like this %APPDATA%\Roaming\npm\iconic -v
Lets assume that works. That means that the command was successfully installed and will run, now we need to add it to your PATH so you can run it from the command line.
Next, Press Windows key and type "path" and select "Edit environment variables for your account". From here. Add or append the path %APPDATA%\Roaming\npm to your PATH variable, and save the results.
Once it is on your PATH you can run it from any command shell window.
Next, start a new command shell (e.g., Windows+R, cmd, Enter) and then type the command iconic -v. Viola, it should work without requiring the full path to the script.
I'm doing most of this from memory so hopefully it's correct. But if it needs some tweeks, let me know and I'll update the answer.
For completness, this install didn't actually fail. The lines with fsevents are warnings. The fsevents package is only designed to work on Mac Unix so these warnings can be safely ignored.
As Suraj Rao mentioned, also see Nodejs cannot find installed module on Windows?.

How do I run win32-openssh through the powershell? (installed with install-package from chocolatey provider)

So I am just trying to convert to powershell from bash. I was trying to find a way to SSH my server, and found out I could install win32-openssh to do so.
I installed it by:
Installing chocolatey as packageprovider using:
install-packageprovider chocolatey
Then i installed win32-openssh with the command:
install-package win32-openssh
My problem is now, how do I run this program?
It installs the correct binaries etc. It will not add some PS cmdlets for the use off ssh inside PS.
It is all described on the package site:
This package performs the following operations that you normally have to hack at until you get what you want:
Install Appropriate Bitness for the version of Windows
Install to Program Files (malware protection and following advice of dev team)
Add SSH location to System PATH
Optionally install sshd windows service (Requires parameter - see below)
Optionally install sshd server "key based authentication" (Requires parameter - see below)
Cleanly uninstall all of the above (removing config files and server keys requires special switch - see below)
So you can run it from start menu, or by typing ssh.exe into a prompt.
You have Two Options I can think of.
Option 1 : Use bash on Windows 10. Bash comes bundled with Windows 10. You can just enable a Windows 10 feature for it. Setup bash on Windows 10. You'll never miss bash again even if you're on Windows. [Recommended Option]
Option 2 : Set up SSH on Powershell by installing a package like PoSH-SSH.
Steps :
Pre-requisite : PC running Windows 10. Open PowerShell in Admin mode.
Find-Module PoSH-SSH
type 'Y' for the prompts.
Install-Module Posh-SSH
type 'A' for the prompts.
Reference:
https://www.thomasmaurer.ch/2016/04/using-ssh-with-powershell/
There's not really a need for this. If you have git installed on your Windows machine, you can add it's usr/bin folder to you path. It has ssh and other Unix tools you can use just like in Bash in PowerShell or CMD.