From 6205a913b770c8fa053c22fb220fbd0c8287228a Mon Sep 17 00:00:00 2001 From: jdhao Date: Sun, 8 Aug 2021 22:51:01 +0800 Subject: [PATCH] Neovim --> Nvim --- README.md | 10 +++++----- core/autocommands.vim | 2 +- core/options.vim | 2 +- docs/README.md | 26 +++++++++++++------------- docs/nvim_setup_linux.sh | 10 +++++----- init.vim | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 19f6126..c0e2f9b 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ # Introduction This repo hosts my Nvim configuration for all the platforms I am using (Linux, -Windows and macOS). `init.vim` is the config entry point for terminal Neovim, -and `ginit.vim` is the additional config file for GUI client of Neovim (I am +Windows and macOS). `init.vim` is the config entry point for terminal Nvim, +and `ginit.vim` is the additional config file for GUI client of Nvim (I am using [neovim-qt](https://github.com/equalsraf/neovim-qt) for now on Windows). My configurations are heavily documented to make it as clear as possible. While @@ -97,10 +97,10 @@ represents ASCII character `,`. | `t` | Normal | Linux/macOS/Win | Fuzzy buffer tag search in a floating window | | `` | Normal | Linux/macOS/Win | Remove trailing white spaces | | `v` | Normal | Linux/macOS/Win | Reselect last pasted text | -| `ev` | Normal | Linux/macOS/Win | Edit Neovim config in a new tabpage | -| `sv` | Normal | Linux/macOS/Win | Reload Neovim config | +| `ev` | Normal | Linux/macOS/Win | Edit Nvim config in a new tabpage | +| `sv` | Normal | Linux/macOS/Win | Reload Nvim config | | `q` | Normal | Linux/macOS/Win | Quit current window | -| `Q` | Normal | Linux/macOS/Win | Quit all window and close Neovim | +| `Q` | Normal | Linux/macOS/Win | Quit all window and close Nvim | | `w` | Normal | Linux/macOS/Win | Save current buffer content | | `cd` | Normal | Linux/macOS/Win | Change current directory to where current file is | | `y` | Normal | Linux/macOS/Win | Copy the content of entire buffer to default register | diff --git a/core/autocommands.vim b/core/autocommands.vim index 396e7b0..5306b63 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -84,7 +84,7 @@ augroup auto_close_win autocmd BufEnter * call s:quit_current_win() augroup END -" Quit Neovim if we have only one window, and its filetype match our pattern. +" Quit Nvim if we have only one window, and its filetype match our pattern. function! s:quit_current_win() abort let quit_filetypes = ['qf', 'vista'] let buftype = getbufvar(bufnr(), '&filetype') diff --git a/core/options.vim b/core/options.vim index 44f728f..23353b5 100644 --- a/core/options.vim +++ b/core/options.vim @@ -4,7 +4,7 @@ scriptencoding utf-8 " change fillchars for folding, vertical split, end of buffer, and message separator set fillchars=fold:\ ,vert:\│,eob:\ ,msgsep:‾ -" Paste mode toggle, it seems that Neovim's bracketed paste mode +" Paste mode toggle, it seems that Nvim's bracketed paste mode " does not work very well for nvim-qt, so we use good-old paste mode set pastetoggle= diff --git a/docs/README.md b/docs/README.md index acecd98..430a6f2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,18 +1,18 @@ # Pre-requisite -There are a few dependencies if we want to use Neovim for efficient editing +There are a few dependencies if we want to use Nvim for efficient editing and development work. ## Python -A lot of Neovim plugins are mainly written in Python. To use auto-completion +A lot of Nvim plugins are mainly written in Python. To use auto-completion and other features, we must install Python 3. The easiest way to install is via [Anaconda](https://www.anaconda.com/distribution/#download-section) or[Miniconda](https://docs.conda.io/en/latest/miniconda.html). Make sure that you can run `python --version`, and that the output should be Python 3.x. ## Pynvim -Neovim relies on [pynvim](https://github.com/neovim/pynvim) to communicate with +Nvim relies on [pynvim](https://github.com/neovim/pynvim) to communicate with plugins that utilize its Python binding. Pynvim is required by plugins such as [Deoplete](https://github.com/Shougo/deoplete.nvim) and [Semshi](https://github.com/numirias/semshi). @@ -128,8 +128,8 @@ listed [here](https://github.com/dense-analysis/ale/blob/master/supported-tools. ## Terminal emulators Which [terminal emulator](https://en.wikipedia.org/wiki/Terminal_emulator) we -choose to use greatly affects the appearance and functionalities of Neovim. -Since Neovim supports true colors, terminals that support true colors are +choose to use greatly affects the appearance and functionalities of Nvim. +Since Nvim supports true colors, terminals that support true colors are preferred. For a list of terminals that support true colors, see [here](https://github.com/termstandard/colors). For macOS, we can use [iterm2](https://www.iterm2.com/), [kitty](https://sw.kovidgoyal.net/kitty/) or [Alacritty](https://github.com/jwilm/alacritty). @@ -147,9 +147,9 @@ using [Hack](https://github.com/powerline/fonts/tree/master/Hack), and it looks great. Another great resource for programming font is the [nerd-font](https://github.com/ryanoasis/nerd-fonts) project. -# Install Neovim +# Install Nvim -There are various ways to install Neovim based on your system. Note that some +There are various ways to install Nvim based on your system. Note that some of plugins I use require Nvim master. It is recommended to use the nightly version of nvim. @@ -159,7 +159,7 @@ We can directly download the binary release from [here](https://github.com/neovi ## Windows -The easiest way to install Neovim on Windows is via chocolatey. First, install +The easiest way to install Nvim on Windows is via chocolatey. First, install chocolatey. Then we can install neovim easily using the following command: ``` @@ -169,8 +169,8 @@ chocolatey. Then we can install neovim easily using the following command: choco install neovim ``` -The Neovim that chocolatey installs may not be up to date. To use the -cutting-edge features of Neovim, you may download [the nightly +The Nvim that chocolatey installs may not be up to date. To use the +cutting-edge features of Nvim, you may download [the nightly release](https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip) from GitHub and manually extract it. ## macOS @@ -185,7 +185,7 @@ brew install neovim # brew install --HEAD neovim ``` -After installing Neovim, we need to add the directory where the Neovim +After installing Nvim, we need to add the directory where the Nvim executable (`nvim` on Linux and macOS, `nvim.exe` on Windows) resides to the system `PATH`. @@ -228,9 +228,9 @@ time to install all of them, depending on your network condition. # Automatic Installation for Linux # -To set up a workable Neovim environment in Linux, I use the bash script +To set up a workable Nvim environment in Linux, I use the bash script [`nvim_setup_linux.sh`](nvim_setup_linux.sh) to automatically install necessary -dependencies, Neovim itself and Nvim configs in this repo. +dependencies, Nvim itself and Nvim configs in this repo. Note that the variable `PYTHON_INSTALLED`, `SYSTEM_PYTHON` and `ADD_TO_SYSTEM_PATH` in the script should be set properly based on your diff --git a/docs/nvim_setup_linux.sh b/docs/nvim_setup_linux.sh index 29ea4cd..22c2622 100755 --- a/docs/nvim_setup_linux.sh +++ b/docs/nvim_setup_linux.sh @@ -66,7 +66,7 @@ else echo "Python is already installed. Skip installing it." fi -# Install some Python packages used by Neovim plugins. +# Install some Python packages used by Nvim plugins. echo "Installing Python packages" declare -a py_packages=("pynvim" 'python-lsp-server[all]' "black" "vim-vint" "pyls-isort" "pylsp-mypy") @@ -179,7 +179,7 @@ NVIM_SRC_NAME=$HOME/packages/nvim-linux64.tar.gz NVIM_CONFIG_DIR=$HOME/.config/nvim NVIM_LINK="https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz" if [[ ! -f "$NVIM_DIR/bin/nvim" ]]; then - echo "Installing Neovim" + echo "Installing Nvim" echo "Creating nvim directory under tools directory" if [[ ! -d "$NVIM_DIR" ]]; then @@ -187,7 +187,7 @@ if [[ ! -f "$NVIM_DIR/bin/nvim" ]]; then fi if [[ ! -f $NVIM_SRC_NAME ]]; then - echo "Downloading Neovim" + echo "Downloading Nvim" wget "$NVIM_LINK" -O "$NVIM_SRC_NAME" fi echo "Extracting neovim" @@ -197,7 +197,7 @@ if [[ ! -f "$NVIM_DIR/bin/nvim" ]]; then echo "export PATH=\"$NVIM_DIR/bin:\$PATH\"" >> "$HOME/.bash_profile" fi else - echo "Neovim is already installed. Skip installing it." + echo "Nvim is already installed. Skip installing it." fi echo "Setting up config and installing plugins" @@ -214,4 +214,4 @@ git clone --depth=1 https://github.com/wbthomason/packer.nvim \ echo "Installing plugins" "$NVIM_DIR/bin/nvim" +PackerInstall +qall -echo "Finished installing Neovim and its dependencies!" +echo "Finished installing Nvim and its dependencies!" diff --git a/init.vim b/init.vim index 0683240..20f5ed9 100644 --- a/init.vim +++ b/init.vim @@ -14,7 +14,7 @@ "{ Header and Licence "{{ header info -" Description: This is my personal Neovim configuration supporting Mac, Linux +" Description: This is my personal Nvim configuration supporting Mac, Linux " and Windows, with various plugins configured. This configuration evolves as " I learn more about Nvim and becomes more proficient in using Nvim. Since it " is very long (more than 1000 lines!), you should read it carefully and take