diff --git a/runtime/tutor/en/vim-01-beginner.tutor b/runtime/tutor/en/vim-01-beginner.tutor index 18be5ce9a0..c49bbf2969 100644 --- a/runtime/tutor/en/vim-01-beginner.tutor +++ b/runtime/tutor/en/vim-01-beginner.tutor @@ -905,26 +905,7 @@ You can find help on just about any subject, by giving an argument to the :help insert-index :help user-manual ~~~ -# Lesson 7.2: CREATE A STARTUP SCRIPT - -** Enable Neovim features. ** - -Neovim is a very configurable editor. You can customise it any way you like. -To start using more features create an "init.vim" file. - - 1. Start editing the "init.vim" file. - - `:call mkdir(stdpath('config'),'p')`{vim} - `:exe 'edit' stdpath('config').'/init.vim'`{vim} - - 2. Write the file with: - - `:w`{vim} - -You can add all your preferred settings to this "init.vim" file. -For more information type `:help init.vim`{vim}. - -# Lesson 7.3: COMPLETION +# Lesson 7.2: COMPLETION ** Command line completion with ``{normal} and ``{normal}. ** @@ -951,6 +932,29 @@ For more information type `:help init.vim`{vim}. NOTE: Completion works for many commands. It is especially useful for `:help`{vim}. +# Lesson 7.3: CONFIGURING NVIM + +Neovim is a very configurable editor. You can customise it any way you like. To +start using more features, create a vimrc file, which can be "init.lua" if you +want to use Lua, or "init.vim" if you want to use Vimscript. We'll use +"init.lua" in this lesson. + + 1. Start editing the "init.lua" file. + + `:exe 'edit' stdpath('config')..'/init.lua'`{vim} + + 2. Copy the example configuration in Lua to your "init.lua" file. + + `:read $VIMRUNTIME/example_init.lua`{vim} + + 3. Write the file (also creates any missing parent directories): + + `:w ++p`{vim} + + 4. Next time you start Neovim, you can quickly open this vimrc file with: + + `:e $MYVIMRC`{vim} + # Lesson 7 SUMMARY 1. Type `:help`{vim} @@ -962,14 +966,15 @@ NOTE: Completion works for many commands. It is especially useful for `:help`{vi 4. Type `:q`{vim} to close the help window - 5. Create an init.vim startup script to keep your preferred settings. - - 6. While in command mode, press ``{normal} to see possible completions. + 5. While in command mode, press ``{normal} to see possible completions. Press ``{normal} to use the completion menu and select a match. + 6. Create your configuration file to save your preferred settings. You can + revisit it with `:e $MYVIMRC`{vim}. + # What's next? -Run `:help nvim-quickstart`{vim} to get started with configuring or extending Nvim. +Run `:help nvim-quickstart`{vim} for more information on extending Nvim. # CONCLUSION diff --git a/runtime/tutor/ja/vim-01-beginner.tutor b/runtime/tutor/ja/vim-01-beginner.tutor index cde7f36647..9939a15c22 100644 --- a/runtime/tutor/ja/vim-01-beginner.tutor +++ b/runtime/tutor/ja/vim-01-beginner.tutor @@ -895,27 +895,7 @@ Neovim には広範にわたるオンラインヘルプシステムがありま :help insert-index :help user-manual ~~~ - -# レッスン 7.2: 起動スクリプトの作成 - -** Neovim の特徴を発揮する ** - -Neovim はとても自由度の高いエディタです。あなたの好きなようにカスタマイズするこ -とができます。より多くの機能を使いはじめるには "init.vim" ファイルを作成します。 - - 1. "init.vim" ファイルの編集を開始します。 - - `:call mkdir(stdpath('config'),'p')`{vim} - `:exe 'edit' stdpath('config').'/init.vim'`{vim} - - 2. 以下のようにしてファイルを保存します。 - - `:w`{vim} - - この "init.vim" ファイルへ、お好みの設定を追加することができます。 - より多くの情報を得るには `:help init.vim`{vim} とタイプします。 - -# レッスン 7.3: 補完 +# レッスン 7.2: 補完 ** ``{normal} と ``{normal} でコマンドラインを補完する ** @@ -941,6 +921,29 @@ Neovim はとても自由度の高いエディタです。あなたの好きな NOTE: 補完は多くのコマンドで動作します。特に `:help`{vim} の際に役立ちます。 +# レッスン 7.3: 設定ファイルの作成 + +Neovim はとても自由度の高いエディタです。あなたの好きなようにカスタマイズするこ +とができます。より多くの機能を使い始めるには設定ファイルを作成します。 Lua を使 +いたい場合は "init.lua" にし、Vimscript を使いたい場合は "init.vim" にします。 +このレッスンでは "init.lua" を使います。 + +1. `"init.lua"` ファイルを編集します。 + + `:exe 'edit' stdpath('config')..'/init.lua'`{vim} + +2. Lua の例の設定を "init.lua" にコピーします。 + + `:read $VIMRUNTIME/example_init.lua`{vim} + +3. ファイルを書き込みます(必要に応じて親ディレクトリも作成されます): + + `:w ++p`{vim} + +4. 次回 Neovim を起動したときに、以下のコマンドでこの設定ファイルを開けます: + + `:e $MYVIMRC`{vim} + # レッスン 7 要約 1. ヘルプウィンドウを開くには `:help`{vim} とするか ``{normal} を押す。 @@ -951,11 +954,12 @@ NOTE: 補完は多くのコマンドで動作します。特に `:help`{vim} の 4. ヘルプウィンドウを閉じるには `:q`{vim} とタイプする。 - 5. お好みの設定を保つには init.vim 起動スクリプトを作成する。 - - 6. : command で可能な補完を見るには ``{normal} をタイプする。 + 5. コマンドラインモードで可能な補完を見るには ``{normal} をタイプする。 補完を使用するには ``{normal} を押す。 + 6. お好みの設定を保つには設定ファイルを作成する。作成した設定ファイルは + `:e $MYVIMRC`{vim} でいつでも開き直せます。 + # おわりに これにて Neovim のチュートリアルを終わります。エディタを簡単に、しかも充分に使う diff --git a/test/functional/plugin/tutor_spec.lua b/test/functional/plugin/tutor_spec.lua index 2a05bed4d4..b8a17cce57 100644 --- a/test/functional/plugin/tutor_spec.lua +++ b/test/functional/plugin/tutor_spec.lua @@ -131,7 +131,7 @@ describe(':Tutor', function() {0: }University. E-mail: {2:bware@mines.colorado.edu}. | ]] - feed(':973zt') + feed(':978zt') screen:expect(expected) end) end)