TOOL » NEOVIM » VIMSCRIPT

Flow control

Conditions

In the condition, you may apply some logical operations to expressions.

vim
!expression
expression1 && expression2
expression1 || expression2

If condition

vim
if condition
  "Do something
elseif condition
  "Do something
else
  "Do something else
endif

For loop

vim
for value in list
  "Do something
endfor