Skip to content

Commit

Permalink
Formatting, add missing summaries, adjust vimrc to match original vim…
Browse files Browse the repository at this point in the history
…tutor
  • Loading branch information
micahkepe committed Aug 3, 2024
1 parent 284970e commit 8d0d348
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 9 deletions.
78 changes: 70 additions & 8 deletions vimtutor-sequel.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
==============================================================================
= W e l c o m e t o t h e V I M T u t o r S e q u e l - Version 1.0 =
= W e l c o m e t o t h e V I M T u t o r S e q u e l - Version 1.2 =
==============================================================================

Vimtutor Sequel is designed to continue your Vim education from
Expand All @@ -18,11 +18,12 @@
use. That means that you need to execute the commands to learn them
properly. If you only read the text, you will forget the commands!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### TABLE OF CONTENTS ###
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### TABLE OF CONTENTS ###

** To skip to a specific lesson, type: **
/Lesson [number]
** To skip to a specific lesson, type: /Lesson [number] **

LESSONS:

Lesson 8: SPLITTING SCREENS
> 8.1: Creating Splits
Expand Down Expand Up @@ -118,7 +119,7 @@


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 8 SUMMARY
Lesson 8 SUMMARY

1. :sp and :vsp split the screen horizontally and vertically.

Expand Down Expand Up @@ -178,7 +179,7 @@


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 9 SUMMARY
Lesson 9 SUMMARY

1. :setlocal spell spelllang=en_us enables spellcheck.

Expand Down Expand Up @@ -311,6 +312,17 @@ print("Hello world!")
GRYFFINDOR!"


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 10 SUMMARY

1. >, <, and = handle indentation.

2. I, ^x, :norm I#, and :norm ^x can be used to toggle comments for
one or multiple lines.

3. gu, gU, and g~ change the case of text.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 11: ADVANCED SEARCH AND REPLACE

Expand Down Expand Up @@ -351,6 +363,16 @@ print("Hello world!")
you might see a lion.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 11 SUMMARY

1. * and # search for whole words, g* and g# for partial words.

2. :%s/old/new/g replaces all occurrences in the file.

3. Adding 'c' to the end prompts for confirmation on each replacement.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 12: MACROS

Expand Down Expand Up @@ -387,6 +409,16 @@ print("Hello world!")
english cucumber: 1


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 12 SUMMARY

1. qa starts recording a macro into register 'a'.

2. q stops the recording.

3. @a plays back the macro, and @@ repeats the last macro.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 13: VIM SCRIPTING

Expand Down Expand Up @@ -448,6 +480,22 @@ command! Nox call CastSpell("Nox")
Hint: You can use the random() function in Vim to generate a random number.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 13 SUMMARY

1. `let` assigns a value to a variable.

2. `echo` prints a message.

3. `function!` and `endfunction` define a function.

4. `call` invokes a function.

5. Custom commands can be created using `command!`.

6. Mappings can be created with `nnoremap`.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 14: VIM PLUGINS

Expand Down Expand Up @@ -491,6 +539,20 @@ call plug#end()
Install it and try out its basic functionality.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 14 SUMMARY

1. `:PlugInstall` installs plugins with `vim-plug`

2. `:PlugUpdate` updates plugins.

3. `:PlugClean` removes unused plugins.

4. `:PlugStatus` checks the status of plugins.

5. Plugins can be added to your `.vimrc` using `Plug 'plugin/repository'`.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 15.1: VIM SESSIONS

Expand Down Expand Up @@ -553,7 +615,7 @@ call plug#end()


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 15 SUMMARY
Lesson 15 SUMMARY

1. Vim sessions allow you to save and restore your working environment.

Expand Down
8 changes: 7 additions & 1 deletion vimtutor-sequel.vimrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
" Make Vim configuration try to replicate original `vimtutor`
" Vim configuration to match original vimtutor appearance
set nocompatible
filetype off
syntax off
Expand All @@ -7,5 +7,11 @@ set nowrap
set nonumber
set norelativenumber
set background=dark

" Highlighting settings to adjust font weight and colors
highlight Normal ctermfg=grey ctermbg=black
highlight Bold term=bold cterm=bold ctermfg=grey ctermbg=black

" Ensure these settings are loaded
set t_Co=256
set termguicolors

0 comments on commit 8d0d348

Please sign in to comment.