mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
docs(tutor): move lesson 7.2 below lesson 7.3 #33662
Problem:
- Lesson 7.3 (Cmdline Completion) teaches an important way to discover
Nvim features. I think users should learn it before they start
configuring Nvim
- Nvim can be configured in Lua as well, but lesson 7.2 (Configuring
Nvim) only mentions init.vim. And I think Nvim is promoting Lua more
Solution:
- Move lesson 7.2 to be after lesson 7.3
- Lesson 7.2 should teach about init.lua
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
(cherry picked from commit dd43eb445a
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
4e5af2f5a6
commit
e304677993
@@ -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 `<C-d>`{normal} and `<Tab>`{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 `<C-d>`{normal} to see possible completions.
|
||||
5. While in command mode, press `<C-d>`{normal} to see possible completions.
|
||||
Press `<Tab>`{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
|
||||
|
||||
|
@@ -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: 補完
|
||||
|
||||
** `<C-d>`{normal} と `<Tab>`{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} とするか `<F1>`{normal} を押す。
|
||||
@@ -951,11 +954,12 @@ NOTE: 補完は多くのコマンドで動作します。特に `:help`{vim} の
|
||||
|
||||
4. ヘルプウィンドウを閉じるには `:q`{vim} とタイプする。
|
||||
|
||||
5. お好みの設定を保つには init.vim 起動スクリプトを作成する。
|
||||
|
||||
6. : command で可能な補完を見るには `<C-d>`{normal} をタイプする。
|
||||
5. コマンドラインモードで可能な補完を見るには `<C-d>`{normal} をタイプする。
|
||||
補完を使用するには `<Tab>`{normal} を押す。
|
||||
|
||||
6. お好みの設定を保つには設定ファイルを作成する。作成した設定ファイルは
|
||||
`:e $MYVIMRC`{vim} でいつでも開き直せます。
|
||||
|
||||
# おわりに
|
||||
|
||||
これにて Neovim のチュートリアルを終わります。エディタを簡単に、しかも充分に使う
|
||||
|
@@ -131,7 +131,7 @@ describe(':Tutor', function()
|
||||
{0: }University. E-mail: {2:bware@mines.colorado.edu}. |
|
||||
]]
|
||||
|
||||
feed(':973<CR>zt')
|
||||
feed(':978<CR>zt')
|
||||
screen:expect(expected)
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user