4 Star 2 Fork 0

Gitee 极速下载/neovim-qt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/equalsraf/neovim-qt
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
ISC

Build Status Build status Build Status codecov Status Build Status Downloads

Neovim Qt

Neovim Qt is a lightweight cross-platform Neovim GUI written in C++ with Qt.

NeovimQt Screenshot

Installing Neovim Qt

Neovim Qt is available on all platforms supported by Qt.

Instructions for common platforms are listed below.

Windows

Nightly versions of Neovim Qt require manual download + installation.

Pre-built Windows binaries are provided for all recent commits:
AppVeyor Commit Build Wiki Instructions

Neovim version 0.10.0 and later

Starting with Neovim version 0.10.0, Neovim Qt is no longer bundled with Neovim on Windows; each package must be installed separately.

> winget install neovim.neovim
> winget install equalsraf.neovim-qt

Neovim versions before 0.10.0

Neovim Qt is bundled with all releases of Neovim on Windows prior to Neovim version 0.10.0.

See the Neovim release page:

Neovim is available as a Chocolatey Package.

Stable Neovim + Neovim Qt:

> choco install neovim

Pre-Release Neovim + Stable Neovim Qt:

> choco install neovim --pre

MacOS

Homebrew

Neovim Qt is available in the Homebrew core package repository.

To install the latest release:

$ brew install neovim-qt

To install the latest development version:

$ brew install --HEAD neovim-qt

Linux

Neovim Qt is packaged for many distributions, use your favorite package manager.

If your distribution is not listed here, please create an Issue with instructions.

Arch Linux

Neovim Qt is available from the Arch Community Repository.

$ sudo pacman -S neovim-qt

Gentoo

Neovim Qt is available from this Portage Ebuild.

Alternatively, you can add the entire overlay:

$ eselect repository add jgehrig git https://github.com/jgehrig/gentoo.git
$ emerge --sync
$ emerge -av neovim-qt

OpenSUSE

Neovim Qt is available from this Community Package.

Debian, Ubuntu

Neovim Qt is in both the Debian and Ubuntu package repositories, and can be installed with APT. This means that it should also available on any OS that uses these repositories, such as Linux Mint.

$ apt install neovim-qt

Homebrew

Homebrew supports Linux (sometimes called "Linuxbrew"); follow the MacOS Homebrew installation instructions.

Configuration

Neovim Qt can be configured through the ginit.vim file.

The default locations are:

  • Windows: %LOCALAPPDATA%\nvim\ginit.vim
  • MacOS: ~/.config/nvim/ginit.vim
  • Linux: ~/.config/nvim/ginit.vim

Recommended ginit.vim:

" Enable Mouse
set mouse=a

" Set Editor Font
if exists(':GuiFont')
    " Use GuiFont! to ignore font errors
    GuiFont {font_name}:h{size}
endif

" Disable GUI Tabline
if exists(':GuiTabline')
    GuiTabline 0
endif

" Disable GUI Popupmenu
if exists(':GuiPopupmenu')
    GuiPopupmenu 0
endif

" Enable GUI ScrollBar
if exists(':GuiScrollBar')
    GuiScrollBar 1
endif

" Right Click Context Menu (Copy-Cut-Paste)
nnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>
inoremap <silent><RightMouse> <Esc>:call GuiShowContextMenu()<CR>
xnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>gv
snoremap <silent><RightMouse> <C-G>:call GuiShowContextMenu()<CR>gv

For more options, try :help nvim_gui_shim and scroll down to Commands.

More detailed information can be found on the Configuration Wiki Page.

Frequently Asked Questions

Why are the :Gui commands missing?

You need the Neovim Qt runtime to use commands like :GuiFont.

You can manually specify the path with NVIM_QT_RUNTIME_PATH.

Alternatively, you can install the Neovim Qt plugin separately: Plugin 'equalsraf/neovim-gui-shim

On recent releases, you can check if the runtime is loaded with nvim-qt --version:

$ nvim-qt --version
NVIM-QT v0.2.16.1
Build type: Release
Compilation:-march=native -O2 -pipe -Wall -Wextra -Wno-unused-parameter -Wunused-variable -std=c++11
Qt Version: 5.15.2
Environment:
  nvim: nvim
    args: --cmd let &rtp.=',/usr/share/nvim-qt/runtime' --cmd set termguicolors
      runtime: /usr/share/nvim-qt/runtime
...

Notice that runtime: is non-empty and points to a folder with nvim_gui_shim.vim.

Why does :Gui not work in init.vim?

The :Gui... commands are not loaded when init.vim runs.

These options must be configured from ginit.vim. The file should be placed in the same directory as init.vim.

Alternatively, Neovim Qt responds to some vim options. You can :set guifont=... directly in init.vim.

How do I disable the GUI Tabs?

Try :GuiTabline 0. This option can be added to ginit.vim.

To prevent startup flicker, see Wiki - Configuration Options

Why does the popup menu look different?

Try :GuiPopupmenu 0. This option can be added to ginit.vim.

The menu looks different because it is a widget rendered via Qt. Many users expect the nvim TUI (Terminal UI) menu instead.

How do I change the font?

Use the :GuiFont command or the 'guifont' setting. For example, :GuiFont Fira Code:h12, or :set guifont=Hack:h12.

Why does :GuiFont throw an error?

You may see these errors:

  • {Font Name} is not a fixed pitch Font
  • Warning: Font {Font Name} reports bad fixed pitch metrics

You can override this warning with :GuiFont! {Font Name}.

These warnings display for fonts containing variable-width characters.

They are safe to ignore, but you might notice font spacing and clipping issues.

Why is Neovim unable to start?

The nvim binary must be in your $PATH. You can manually provide a path to Neovim:

$ nvim-qt --nvim {path_to_nvim}

In recent versions, nvim-qt --version reports the nvim binary path:

$ nvim-qt --version
...
Environment:
  nvim: nvim
...

Building From Source

Detailed build instructions can be found at the Wiki.

Simplified Build Commands:

$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
$ NVIM_QT_RUNTIME_PATH=../src/gui/runtime bin/nvim-qt

NOTE: NVIM_QT_RUNTIME_PATH must be set for commands such as :GuiFont to work.

ISC License Copyright (c) 2015 Rui Abreu Ferreira <raf-ep@gmx.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

简介

neovim-qt 是 Neovim 客户端的 GUI,使用 QT5 展开 收起
C/C++
ISC
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/neovim-qt.git
git@gitee.com:mirrors/neovim-qt.git
mirrors
neovim-qt
neovim-qt
master

搜索帮助