mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:30:04 +08:00
fix(core): fix Windows install script && update faq
This commit is contained in:
parent
e9b5a524a6
commit
a1b65988e7
11
docs/faq.md
11
docs/faq.md
@ -13,6 +13,7 @@ and usage.
|
|||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Where is my old vim configuration?](#where-is-my-old-vim-configuration)
|
- [Where is my old vim configuration?](#where-is-my-old-vim-configuration)
|
||||||
- [How to uninstall SpaceVim?](#how-to-uninstall-spacevim)
|
- [How to uninstall SpaceVim?](#how-to-uninstall-spacevim)
|
||||||
|
- [How to perform manual installation?](#how-to-perform-manual-installation)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Can I try SpaceVim without overwriting my vimrc?](#can-i-try-spacevim-without-overwriting-my-vimrc)
|
- [Can I try SpaceVim without overwriting my vimrc?](#can-i-try-spacevim-without-overwriting-my-vimrc)
|
||||||
- [Why use toml as the default configuration file format?](#why-use-toml-as-the-default-configuration-file-format)
|
- [Why use toml as the default configuration file format?](#why-use-toml-as-the-default-configuration-file-format)
|
||||||
@ -42,6 +43,16 @@ and if you uninstalll SpaceVim, your vimrc will come back. you can run:
|
|||||||
curl -sLf https://spacevim.org/install.sh | bash -s -- --uninstall
|
curl -sLf https://spacevim.org/install.sh | bash -s -- --uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### How to perform manual installation?
|
||||||
|
|
||||||
|
Clone the SpaceVim Github repository to `~/.SpaceVim` and link Vim and Neovim user folder `~/.SpaceVim`. Delete `~/.vimrc`.
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/SpaceVim/SpaceVim.git ~/.SpaceVim
|
||||||
|
ln -s ~/.SpaceVim ~/.vim
|
||||||
|
ln -s ~/.SpaceVim ~/.config/nvim
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Can I try SpaceVim without overwriting my vimrc?
|
### Can I try SpaceVim without overwriting my vimrc?
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
@PowerShell -ExecutionPolicy Bypass -Command Invoke-Expression $('$args=@(^&{$args} %*);'+[String]::Join(';',(Get-Content '%~f0') -notmatch '^^@PowerShell.*EOF$')) & goto :EOF
|
@PowerShell -ExecutionPolicy Bypass -Command Invoke-Expression $('$args=@(^&{$args} %*);'+[String]::Join(';',(Get-Content '%~f0') -notmatch '^^@PowerShell.*EOF$')) & goto :EOF
|
||||||
|
|
||||||
|
Push-Location ~
|
||||||
|
|
||||||
|
$app_name = "SpaceVim"
|
||||||
|
$repo_url = "https://github.com/SpaceVim/SpaceVim.git"
|
||||||
|
$repo_name = "SpaceVim"
|
||||||
|
$repo_path = "$HOME\.SpaceVim"
|
||||||
|
$version= "2.0.0-dev"
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo " /###### /## /##/## "
|
echo " /###### /## /##/## "
|
||||||
echo " /##__ ## | ## | #|__/ "
|
echo " /##__ ## | ## | #|__/ "
|
||||||
echo " | ## \__/ /###### /###### /####### /######| ## | ##/##/######/#### "
|
echo " | ## \__/ /###### /###### /####### /######| ## | ##/##/######/#### "
|
||||||
@ -11,14 +20,7 @@ echo " \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/
|
|||||||
echo " | ## "
|
echo " | ## "
|
||||||
echo " | ## "
|
echo " | ## "
|
||||||
echo " |__/ "
|
echo " |__/ "
|
||||||
echo " version : 2.0.0-dev by : spacevim.org "
|
echo " version : $version by : spacevim.org "
|
||||||
|
|
||||||
Push-Location ~
|
|
||||||
|
|
||||||
$app_name = "SpaceVim"
|
|
||||||
$repo_url = "https://github.com/SpaceVim/SpaceVim.git"
|
|
||||||
$repo_name = "SpaceVim"
|
|
||||||
$repo_path = "$HOME\.SpaceVim"
|
|
||||||
|
|
||||||
Function Pause ($Message = "Press any key to continue . . . ") {
|
Function Pause ($Message = "Press any key to continue . . . ") {
|
||||||
if ((Test-Path variable:psISE) -and $psISE) {
|
if ((Test-Path variable:psISE) -and $psISE) {
|
||||||
@ -31,6 +33,7 @@ Function Pause ($Message = "Press any key to continue . . . ") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "==> Starting Testing Procedure..."
|
echo "==> Starting Testing Procedure..."
|
||||||
echo ""
|
echo ""
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -51,58 +54,87 @@ if (Get-Command "git" -ErrorAction SilentlyContinue) {
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "==> Testing vim"
|
echo "==> Testing Vim"
|
||||||
if (Get-Command "gvim" -ErrorAction SilentlyContinue) {
|
if (Get-Command "vim" -ErrorAction SilentlyContinue) {
|
||||||
echo ($(vim --version) -split '\n')[0]
|
echo ($(vim --version) -split '\n')[0]
|
||||||
echo "[OK] Test successfully. Moving to next..."
|
echo "[OK] Test successfully. Moving to next..."
|
||||||
sleep 1
|
sleep 1
|
||||||
} else {
|
} else {
|
||||||
echo "[WARNING] Unable to find 'gvim.exe' in your PATH. But installation still can continue..."
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "[WARNING] Please install gvim later or make your PATH correctly set! "
|
echo "[ERROR] Unable to find 'vim.exe' in your PATH"
|
||||||
|
echo "Please install vim later or make your PATH correctly set!"
|
||||||
|
echo ">>> Ready to Exit......"
|
||||||
Pause
|
Pause
|
||||||
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "<== Testing Procedure Completed. Moving to next..."
|
echo "<== Testing Procedure Completed. Moving to next..."
|
||||||
|
echo ""
|
||||||
sleep 1
|
sleep 1
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
if (!(Test-Path "$HOME\.SpaceVim")) {
|
if (!(Test-Path $HOME\.SpaceVim)) {
|
||||||
echo "==> Trying to clone $app_name"
|
echo "==> Trying to clone $app_name"
|
||||||
git clone $repo_url $repo_path
|
git clone $repo_url $repo_path
|
||||||
|
echo "<== $app_name cloned"
|
||||||
} else {
|
} else {
|
||||||
echo "==> Trying to update $app_name"
|
echo "==> Trying to update $app_name"
|
||||||
Push-Location $repo_path
|
Push-Location $repo_path
|
||||||
git pull origin master
|
git pull origin master
|
||||||
|
Pop-Location
|
||||||
|
echo "<== $app_name updated"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path $HOME/_vimrc) {
|
||||||
|
mv $HOME/_vimrc $HOME\vimfiles_back
|
||||||
|
echo "Backing up _vimrc"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "==> Trying to install $app_name for Vim"
|
||||||
if (!(Test-Path "$HOME\vimfiles")) {
|
if (!(Test-Path $HOME\vimfiles)) {
|
||||||
|
cmd /c mklink /J $HOME\vimfiles $repo_path
|
||||||
|
echo "[OK] vimfiles created"
|
||||||
|
} else {
|
||||||
|
echo "Backing up vimfiles"
|
||||||
|
if (Test-Path $HOME\vimfiles_back) {
|
||||||
|
cmd /c rmdir /s /q $HOME\vimfiles_back
|
||||||
|
}
|
||||||
|
mv $HOME\vimfiles $HOME\vimfiles_back
|
||||||
cmd /c mklink /J $HOME\vimfiles $repo_path
|
cmd /c mklink /J $HOME\vimfiles $repo_path
|
||||||
} else {
|
echo "[OK] vimfiles updated"
|
||||||
echo "[OK] vimfiles already exists"
|
sleep 1
|
||||||
sleep 1
|
|
||||||
}
|
}
|
||||||
|
echo "<== $app_name for Vim installed"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if (!(Test-Path "$HOME\AppData\Local\nvim")) {
|
if (Get-Command "nvim" -ErrorAction SilentlyContinue) {
|
||||||
cmd /c mklink /J "$HOME\AppData\Local\nvim" $repo_path
|
echo "==> Trying to install $app_name for Neovim"
|
||||||
|
if (!(Test-Path $HOME\AppData\Local\nvim)) {
|
||||||
|
cmd /c mklink /J "$HOME\AppData\Local\nvim" $repo_path
|
||||||
|
echo "[OK] nvim created"
|
||||||
} else {
|
} else {
|
||||||
echo "[OK] $HOME\AppData\Local\nvim already exists"
|
if (Test-Path $HOME\AppData\Local\nvim_back) {
|
||||||
sleep 1
|
cmd /c rmdir /s /q $HOME\AppData\Local\nvim_back
|
||||||
|
}
|
||||||
|
cmd /c rmdir /s /q $HOME\vimfiles_back
|
||||||
|
mv $HOME\AppData\Local\nvim $HOME\AppData\Local\nvim_back
|
||||||
|
cmd /c mklink /J $HOME\AppData\Local\nvim $repo_path
|
||||||
|
echo "[OK] nvim updated"
|
||||||
|
sleep 1
|
||||||
}
|
}
|
||||||
|
echo "<== $app_name for Neovim installed"
|
||||||
|
}
|
||||||
|
|
||||||
|
Pop-Location
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Almost done!"
|
echo "Almost done!"
|
||||||
echo "=============================================================================="
|
echo "=============================================================================="
|
||||||
echo "== Open GVim and it will install the plugins automatically =="
|
echo "== Open Vim or Neovim and it will install the plugins automatically =="
|
||||||
echo "=============================================================================="
|
echo "=============================================================================="
|
||||||
echo ""
|
echo ""
|
||||||
echo "That's it. Thanks for installing $app_name. Enjoy!"
|
echo "That's it. Thanks for installing $app_name. Enjoy!"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
Pause
|
Pause
|
||||||
|
|
||||||
# vim:set ft=powershell nowrap:
|
|
||||||
|
@ -11,10 +11,11 @@ configure, and use SpaceVim. It also lists a series of resources for learning Sp
|
|||||||
If you've never heard of SpaceVim, this is the best place to start.
|
If you've never heard of SpaceVim, this is the best place to start.
|
||||||
It will give you a good idea of what SpaceVim is like.
|
It will give you a good idea of what SpaceVim is like.
|
||||||
|
|
||||||
|
|
||||||
<!-- vim-markdown-toc GFM -->
|
<!-- vim-markdown-toc GFM -->
|
||||||
|
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Linux and macOS](#linux-and-macos)
|
- [Linux and macOS](#linux-and-macos)
|
||||||
- [Windows](#windows)
|
- [Windows](#windows)
|
||||||
- [Run in docker](#run-in-docker)
|
- [Run in docker](#run-in-docker)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
@ -32,7 +33,7 @@ which are needed for downloading plugins and fonts.
|
|||||||
|
|
||||||
If you are using a terminal emulator, you will need to set the font in the terminal configuration.
|
If you are using a terminal emulator, you will need to set the font in the terminal configuration.
|
||||||
|
|
||||||
### Linux and macOS
|
## Linux and macOS
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sLf https://spacevim.org/install.sh | bash
|
curl -sLf https://spacevim.org/install.sh | bash
|
||||||
@ -66,7 +67,7 @@ and a C compiler (like `gcc`) to build the dll (see issue [#435](https://github.
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
The easiest way is to download [install.cmd](../install.cmd) and run it as administrator, or install SpaceVim manually.
|
The easiest way is to download and run [install.cmd](../install.cmd) or install [SpaceVim manually](../faq.md#how-to-perform-manual-installation). The script installs or updates SpaceVim (if it exists) for Vim and Neovim.
|
||||||
|
|
||||||
## Run in docker
|
## Run in docker
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user