ホンムノート

nvim

NeovimはVimに基づくコードエディタであり、テキストを編集するために複数の異なるモードを用います。通常モード(normal mode)では、``キーを押すと挿入モード(insert mode)に移行します。<Esc>または<Ctrl c>を押すことで、通常モードに戻ることができます。通常モードでは、一般的なテキスト入力がサポートされていません。関連資料:`vim`、`vimtutor`、`vimdiff`。<https://neovim.io/>

100% ブラウザのローカル処理 0 データアップロード

一般的な例

ファイルを開く

nvim {{path/to/file}}

テキスト編集モード(挿入モード)に入る

<Esc><i>

現在の行をコピー("yank")または切り取り("delete")し、`<p>`を使用して貼り付けます。

<Esc>{{<y><y>|<d><d>}}

通常モードに移行し、直前の操作を取り消します。

<Esc><u>

現在のファイル内で正規表現検索を実行します(`<n>`/`<N>`を使用して、前の/次の検索結果を表示できます)。

<Esc></>{{search_pattern}}<Enter>

現在のファイルで`regex`形式を使用して全置換を行う

<Esc><:>%s/{{regular_expression}}/{{replacement}}/g<Enter>

通常モードに入り、ファイルを保存して退出してください。

{{<Esc><Z><Z>|<Esc><:>x<Enter>|<Esc><:>wq<Enter>}}

退出すると、変更内容は保存されません。

<Esc><:>q!<Enter>

ヒント: 中括弧{{…}}置き換える必要があるのはパラメータ (パス、ファイル名など) です。 コマンドはローカル端末でのみ実行され、このサイトでは入力は保存されません。

英語原文比較

英語の説明と例を展開します (ソース tldr-pages)

Neovim, a programmer's text editor based on Vim, provides several modes for different kinds of text manipulation. Pressing `` in normal mode enters insert mode. `<Esc>` or `<Ctrl c>` goes back to normal mode, which doesn't allow regular text insertion. See also: `vim`, `vimtutor`, `vimdiff`. More information: <https://neovim.io/>

Open a file

nvim {{path/to/file}}

Enter text editing mode (insert mode)

<Esc><i>

Copy ("yank") or cut ("delete") the current line (paste it with `<p>`)

<Esc>{{<y><y>|<d><d>}}

Enter normal mode and undo the last operation

<Esc><u>

Search for a pattern in the file (press `<n>`/`<N>` to go to next/previous match)

<Esc></>{{search_pattern}}<Enter>

Perform a `regex` substitution in the whole file

<Esc><:>%s/{{regex}}/{{replacement}}/g<Enter>

Enter normal mode and save (write) the file, and quit

{{<Esc><Z><Z>|<Esc><:>x<Enter>|<Esc><:>wq<Enter>}}

Quit without saving

<Esc><:>q!<Enter>

コマンド情報

コマンド名nvim
目的NeovimはVimに基づくコードエディタであり、テキストを編集するために複数の異なるモードを用います。通常モード(normal mode)では、``キーを押すと挿入モード(insert mode)に移行します。<Esc>または<Ctrl c>を押すことで、通常モードに戻ることができます。通常モードでは、一般的なテキスト入力がサポートされていません。関連資料:`vim`、`vimtutor`、`vimdiff`。<https://neovim.io/>
対応プラットフォーム通用
例の数8 記事
公式ドキュメントi
データソースtldr-pages(CC-BY-4.0)· コミュニティ中国語翻訳

よくある質問

nvim コマンドは何をするのでしょうか?

NeovimはVimに基づくコードエディタであり、テキストを編集するために複数の異なるモードを用います。通常モード(normal mode)では、``キーを押すと挿入モード(insert mode)に移行します。<Esc>または<Ctrl c>を押すことで、通常モードに戻ることができます。通常モードでは、一般的なテキスト入力がサポートされていません。関連資料:`vim`、`vimtutor`、`vimdiff`。<https://neovim.io/>

nvim 使い方は?

シーン別ページ一覧8一般的に使用される例: 各例では、最初に目的を説明し、次に直接コピーできる完全なコマンドを示します (置換する必要があるパラメーターは中括弧内にあります)。

nvim 最も一般的に使用される操作は何ですか?

ファイルを開く:nvim {{path/to/file}}

コマンドの中の中括弧は何を意味しますか?

中括弧{{…}}パスやファイル名などの独自の値に置き換える必要があることを示します。 同じ名前のパラメータには角かっこ (例:[-C|--directory]) は任意の書き込みを示します。