November 2018
Beginner
330 pages
7h 21m
English
You've already discovered some basics of Vimscript syntax. To set internal Vim options, you use the set keyword:
set background=dark
To assign a value to a non-internal variable, use the let keyword:
let animal_name = 'Miss Cattington'
Vimscript doesn't have explicit booleans, so 1 is treated as true and 0 as false:
let is_cat = 1
Since we're assigning variables, let's talk about scopes. Vim handles variable and function scopes with prefixes, like so:
let g:animal_name = 'Miss Cattington'let w:is_cat=1
Each letter has a unique meaning, in particular the following:
Read now
Unlock full access