Zum Inhalt springen

Neovim Release Notes

Einträge
186
Quellen
2
Zuletzt aktualisiert

Folge Neovim, um die Release Notes in deinen Feed zu holen.

Neovim

Ada filetype plugins

Ada filetype plugins ft-ada-syntax

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


1. Syntax Highlighting ~

This mode is designed for the 2005 edition of Ada ("Ada 2005"), which includes support for objected-programming, protected types, and so on. It handles code written for the original Ada language ("Ada83", "Ada87", "Ada95") as well, though code which uses Ada 2005-only keywords will be wrongly colored (such code should be fixed anyway). For more information about Ada, see http://www.adapower.com.

The Ada mode handles a number of situations cleanly.

For example, it knows that the "-" in "-5" is a number, but the same character in "A-5" is an operator. Normally, a "with" or "use" clause referencing another compilation unit is coloured the same way as C's "#include" is coloured. If you have "Conditional" or "Repeat" groups coloured differently, then "end if" and "end loop" will be coloured as part of those respective groups.

You can set these to different colours using vim's "highlight" command (e.g., to change how loops are displayed, enter the command ":hi Repeat" followed by the colour specification; on simple terminals the colour specification ctermfg=White often shows well). …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Add new menus

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


By now you know that Vim is very flexible. This includes the menus used in the GUI. You can define your own menu entries to make certain commands easily accessible. This is for mouse-happy users only.

42.1 Introduction 42.2 Menu commands 42.3 Various 42.4 Toolbar and popup menus

42.1 Introduction

The menus that Vim uses are defined in the file "$VIMRUNTIME/menu.vim". If you want to write your own menus, you might first want to look through that file. To define a menu item, use the ":menu" command. The basic form of this command is as follows:

:menu {menu-item} {keys}

The {menu-item} describes where on the menu to put the item. A typical {menu-item} is "File.Save", which represents the item "Save" under the "File" menu. A dot is used to separate the names. Example:

:menu File.Save :update<CR> …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Arabic Language support (options & mappings) for Vim

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


These functions have been created by Nadim Shaikli <nadim-at-arabeyes.org>

It is best to view this file with these settings within VIM's GUI:

:set encoding=utf-8 :set arabicshape

Introduction

Arabic is a rather demanding language in which a number of special features are required. Characters are right-to-left oriented and ought to appear as such on the screen (i.e. from right to left). Arabic also requires shaping of its characters, meaning the same character has a different visual form based on its relative location within a word (initial, medial, final or stand-alone). Arabic also requires two different forms of combining and the ability, in certain instances, to either superimpose up to two characters on top of another (composing) or the actual substitution of two characters into one (combining). Lastly, to display Arabic properly one will require not only ISO-8859-6 (U+0600-U+06FF) fonts, but will also require Presentation Form-B (U+FE70-U+FEFF) fonts both of which are subsets within a so-called ISO-10646-1 font.

The commands, prompts and help files are not in Arabic, therefore the user interface remains the standard Vi interface.

Highlights …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Automatic commands

Automatic commands autocmd autocommand

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


For a basic explanation, see section 40.3 in the user manual.

1. Introduction autocmd-intro

You can specify commands to be executed automatically when reading or writing a file, when entering or leaving a buffer or window, and when exiting Vim. For example, you can create an autocommand to set the 'cindent' option for files matching *.c. You can also use autocommands to implement advanced features, such as editing compressed files (see gzip-example). The usual place to put autocommands is in your vimrc file.

E203 E204 E143 E855 E937 E952 E1312 WARNING: Using autocommands is very powerful, and may lead to unexpected side effects. Be careful not to destroy your text.

It's a good idea to do some testing on an expendable copy of a file first. For example: If you use autocommands to decompress a file when starting to edit it, make sure that the autocommands for compressing when writing work correctly. …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Automatic indenting

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


This file is about indenting C programs and other files.

1. Indenting C style programs C-indenting

The basics for C style indenting are explained in section 30.2 of the user manual.

Vim has options for automatically indenting C style program files. Many programming languages including Java and C++ follow very closely the formatting conventions established with C. These options affect only the indent and do not perform other formatting. There are additional options that affect other kinds of formatting as well as indenting, see format-comments, fo-table, gq and formatting for the main ones. …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Builtin plugin: zip

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


Nvim opens a read-only listing when :edit is used with a zip archive. The listing is a dir buffer with 'filetype' set to "zip"; entries open as read-only zip://{archive}/{path} buffers. Requires the unzip executable.

Recognized extensions include zip, jar, apk, epub, Office and OpenDocument formats, whl, xpi, pkpass, and cbz. Remote archives are fetched by vim.net.

Reading an entry from an encrypted archive prompts for its password.

To disable the built-in zip browser, set this before startup:


vim.g.loaded_nvim_zip_plugin = 1

MAPPINGS zip-mappings

x extracts the entry under the cursor into the current directory, discarding its path inside the archive. It never overwrites an existing file.

At the archive root, - opens the containing filesystem directory.

LIMITATIONS zip-limitations …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Checkhealth

Checkhealth vim.health health

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


vim.health is a minimal framework to help users troubleshoot configuration and any other environment conditions that a plugin might care about. Nvim ships with healthchecks for configuration, performance, python support, ruby support, clipboard support, and more.

To run all healthchecks, use:

:checkhealth

Plugin authors are encouraged to write new healthchecks. health-dev

COMMANDS health-commands

:che[ckhealth] Run all healthchecks.

Nvim depends on $VIMRUNTIME, 'runtimepath' and 'packpath' to find the standard "runtime files" for syntax highlighting, filetype-specific behavior, and standard plugins (including :checkhealth). If the runtime files cannot be found then those features will not work.

:che[ckhealth] {plugins} Run healthcheck(s) for one or more plugins. E.g. to run only the standard Nvim healthcheck:

:checkhealth vim.health
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Clever tricks

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


By combining several commands you can make Vim do nearly everything. In this chapter a number of useful combinations will be presented. This uses the commands introduced in the previous chapters and a few more.

12.1 Replace a word 12.2 Change "Last, First" to "First Last" 12.3 Sort a list 12.4 Reverse line order 12.5 Count words 12.6 Find a man page 12.7 Trim blanks 12.8 Find where a word is used

Next chapter: usr_20.txt Typing command-line commands quickly Previous chapter: usr_11.txt Recovering from a crash Table of contents: usr_toc.txt

12.1 Replace a word

The substitute command can be used to replace all occurrences of a word with another word:

:%s/four/4/g …

Originalquelle(öffnet in neuem Tab)Problem melden

Neovim

Command-line mode

Command-line mode cmdline Command-line mode-cmdline :

Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.


Command-line mode is used to enter Ex commands (":"), search patterns ("/" and "?"), and filter commands ("!").

Basic command line editing is explained in chapter 20 of the user manual usr_20.txt.

1. Command-line editing cmdline-editing

Normally characters are inserted in front of the cursor position. You can move around in the command-line with the left and right cursor keys. With the <Insert> key, you can toggle between inserting and overstriking characters.

Note that if your keyboard does not have working cursor keys or any of the other special keys, you can use ":cnoremap" to define another key for them. For example, to define tcsh style editing keys: tcsh-style

:cnoremap <C-A> <Home> :cnoremap <C-F> <Right> :cnoremap <C-B> <Left> :cnoremap <Esc>b <S-Left> :cnoremap <Esc>f <S-Right>

(<> notation <>; type all this literally) …

Originalquelle(öffnet in neuem Tab)Problem melden