mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
tutor: Update vim-tutor to 0.2.1
Also, some tweaks based on input by @fdinoff on gitter.
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
" Setup: {{{1
|
" Setup: {{{1
|
||||||
function! tutor#SetupVim()
|
function! tutor#SetupVim()
|
||||||
|
if &col < 90
|
||||||
|
set columns=90
|
||||||
|
endif
|
||||||
|
if !exists('g:did_load_ftplugin') || g:did_load_ftplugin != 1
|
||||||
|
filetype plugin on
|
||||||
|
endif
|
||||||
if has('syntax')
|
if has('syntax')
|
||||||
if !exists('g:syntax_on') || g:syntax_on == 0
|
if !exists('g:syntax_on') || g:syntax_on == 0
|
||||||
syntax on
|
syntax on
|
||||||
@@ -336,6 +342,7 @@ function! tutor#TutorCmd(tutor_name)
|
|||||||
let l:to_open = l:tutors[l:tutor_to_open-1]
|
let l:to_open = l:tutors[l:tutor_to_open-1]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
call tutor#SetupVim()
|
||||||
exe "edit ".l:to_open
|
exe "edit ".l:to_open
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@@ -21,8 +21,9 @@ setlocal iskeyword=@,-,_
|
|||||||
|
|
||||||
setlocal foldmethod=expr
|
setlocal foldmethod=expr
|
||||||
setlocal foldexpr=tutor#TutorFolds()
|
setlocal foldexpr=tutor#TutorFolds()
|
||||||
setlocal foldcolumn=3
|
setlocal foldcolumn=1
|
||||||
setlocal foldlevel=4
|
setlocal foldlevel=4
|
||||||
|
setlocal nowrap
|
||||||
|
|
||||||
setlocal statusline=%{toupper(expand('%:t:r'))}\ tutorial%=
|
setlocal statusline=%{toupper(expand('%:t:r'))}\ tutorial%=
|
||||||
setlocal statusline+=%{tutor#InfoText()}
|
setlocal statusline+=%{tutor#InfoText()}
|
||||||
|
@@ -7,6 +7,12 @@ IMPORTANT to remember that this tutor is set up to teach by use. That means
|
|||||||
that you need to do the exercises to learn them properly. If you only read
|
that you need to do the exercises to learn them properly. If you only read
|
||||||
the text, you will soon forget what is most important!
|
the text, you will soon forget what is most important!
|
||||||
|
|
||||||
|
For now, make sure that your Shift-Lock key is NOT depressed and press the `j`{normal}
|
||||||
|
key enough times to move the cursor so that Lesson 0 completely fills the
|
||||||
|
screen.
|
||||||
|
|
||||||
|
# Lesson 0
|
||||||
|
|
||||||
NOTE: The commands in the lessons will modify the text, but those changes won't
|
NOTE: The commands in the lessons will modify the text, but those changes won't
|
||||||
be saved. Don't worry about messing things up; just remember that pressing
|
be saved. Don't worry about messing things up; just remember that pressing
|
||||||
[<Esc>](<Esc>) and then [u](u) will undo the latest change.
|
[<Esc>](<Esc>) and then [u](u) will undo the latest change.
|
||||||
@@ -30,9 +36,7 @@ or press a sequence of keys
|
|||||||
Text within <'s and >'s (like `<Enter>`{normal}) describes a key to press instead of text
|
Text within <'s and >'s (like `<Enter>`{normal}) describes a key to press instead of text
|
||||||
to type.
|
to type.
|
||||||
|
|
||||||
Now, make sure that your Shift-Lock key is NOT depressed and press the `j`{normal}
|
Now, move to the next lesson (remember, use j).
|
||||||
key enough times to move the cursor so that Lesson 1.1 completely fills the
|
|
||||||
screen.
|
|
||||||
|
|
||||||
## Lesson 1.1: MOVING THE CURSOR
|
## Lesson 1.1: MOVING THE CURSOR
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user