We previously learned about various text objects. In this section we learn how they can help us edit our documents.
Initial Conditions
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
NORMAL
Top
1:1
Move the cursor
vi(
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
VISUAL
Top
1:21
Initial Conditions
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
NORMAL
Top
1:21
Move the cursor
va(
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
VISUAL
Top
1:22
Move the cursor (again)
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
NORMAL
Top
1:22
Move the cursor (again)
vi{
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
VISUAL
60%
3:22
Move the cursor (again)
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
NORMAL
60%
3:21
Move the cursor (again)
va{
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
VISUAL
80%
4:1
Move the cursor (again)
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
NORMAL
40%
2:1
Move the cursor (again)
vi[
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
VISUAL
40%
2:26
Move the cursor (again)
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
NORMAL
40%
2:26
Move the cursor (again)
va[
function·sum(one,·two)·{
····const·list·=·[one,·two];
····return·sum(list);
}
VISUAL
40%
2:27