May 24, 2021 20:00 0 Comment Vim
Case sensitive, Case sensitive, Defensive programming, Practice, We've learned about conditional statements, but if we can't compare them,, if, statements aren't very useful., Vim, of course, allows us to compare th
May 24, 2021 20:00 0 Comment Vim
A multi-line statement, A multi-line statement, The basic usage of If, Else and Elseif, Practice, Each programming language has a way of generating branching processes, which in Vimscript are, if, statements., if, statement is the basic method of g
May 24, 2021 20:00 0 Comment Vim
As an option for variables, As an option for variables, Local options, Register as a variable, Practice, So far we've finished talking about single-line commands. V, im scripts will be used as a scripting language in a third of the chapters later, in the
May 24, 2021 20:00 0 Comment Vim
Comments, Comments, Group, Short Names, Practice, So far we've covered a bunch of Vim commands, which allow you to quickly customize Vim., All commands except automatic command groups are single-line
May 24, 2021 20:00 0 Comment Vim
Width and margin, Width and margin, Common format, Segmentation, Practice, Vim allows you to customize the text displayed by the status bar at the bottom of each window, which you can customize by setting the, statusline, opt
May 24, 2021 20:00 0 Comment Vim
Normal, Normal, Execute, Results, Practice, The concepts contained in Operators and Movements are a very important concept in Vim and the biggest reason why Vim is so efficient., In this chapter
May 24, 2021 20:00 0 Comment Vim
Movement map, Movement map, Change the start position, General rules, Practice, This chapter explores another magical part of the Vim mapping system: the Operator-Pending mapping., Before we begin, let's explain the meaning of a f
May 24, 2021 20:00 0 Comment Vim
What's wrong with that?, What's wrong with that?, Put automatic commands in groups (Grouping Autocommands), Clear the automatic command group, Use automatic commands in Vimrc, Practice, In the previous chapters we learned about automatic commands., Follow these commands:, :autocmd BufWrite * :echom "Writing buffer!", Now use the, :wri
May 24, 2021 21:00 0 Comment Vim
Variable parameters, Variable parameters, Assignment, Practice, There is no doubt that the Vimscript function can accept parameters., Execute the following command:, :function DisplayName(name), : echom "Hello! My
May 24, 2021 21:00 0 Comment Vim
Number form, Number form, Float format, Cast, Division, Practice, It's time to start delving into the types of variables you can use., Let's start with the numeric type., Vimscript has two numeric types: Number and F
May 24, 2021 21:00 0 Comment Vim
Connections (Concatenation), Connections (Concatenation), Special characters, String literally, True value (Truthiness), Practice, Next we'll talk about string types., Since Vim is used to edit text, you will deal with this type frequently., Do the following code:, :echom "Hello",
May 24, 2021 21:00 0 Comment Vim
Length, Length, Cutting, Connection, Case conversion, Practice, Vim has many built-in functions to manipulate strings., In this chapter we'll cover some of the most important string functions., Length, The first fu
May 24, 2021 21:00 0 Comment Vim
execute basic usage, execute basic usage, Is Execute dangerous?, Practice, execute, execute command is used to execute a string as a Vimscript command., We've talked to it before in the previous chapters, but now we'll get to
May 24, 2021 21:00 0 Comment Vim
Avoid mapping, Avoid mapping, Special characters, Practice, Additional questions, So far we've covered some of the most commonly used Vimscript commands, but they're not related to the way text is handled in normal mode every day.,
May 24, 2021 21:00 0 Comment Vim
Practice, Practice, Now that we've, execute, normal!, we can dive into a Vimscript idiom., Execute the following command:, :execute "normal! gg/foo\<cr>dd", This moves to