Oeasy teaches you to play with VIM – 16 – # inline paste

Time:2022-5-14

Beginning and end of line

Recall the last lesson

Oeasy teaches you to play with VIM - 16 - # inline paste

  • jump

    • Jumping forward isf
    • Jumping back isF
  • continue

  • You can add[count]To accelerate
  • Is there anything else interesting?

Do it

#This time, it is started without configuration
vi -u NONE oeasy.java
  • :h fContinue to find commands around
  • fNext to

    • t
    • T
  • What are these two for?
  • Let’s have a look

view help

Oeasy teaches you to play with VIM - 16 - # inline paste

  • Different meanings

    • fThe corresponding word isfindfind
    • tThe corresponding word istillClose to
  • Different location

    • fThe cursor jumps directly over the character you are looking for
    • tThe cursor jumps over the previous character of the search character and sticks to the search character

have a try

Oeasy teaches you to play with VIM - 16 - # inline paste

  • feIs to move the cursor toeabove
  • teIs to move the cursor toeAbove previous characters
  • ;Can we continue?
  • It doesn’t seem to work. What should I do?

Continue moving

  • You can’t go straight to the next one
  • Because it has arrivedePrevious position
  • Then we can

    • beforelMove the cursor toeabove
    • Then the little thumb falls directly on the;

      • tillnexte
    • againlMove the cursor toeabove
    • Drop your thumb again;

      • tillnexte
  • stay;In the process of

    • The repeated operation is stilltill
    • tillThe object is stille

Oeasy teaches you to play with VIM - 16 - # inline paste

  • Can we go in the opposite direction,And?

Continue reverse till

Oeasy teaches you to play with VIM - 16 - # inline paste

  • ,Change search direction

    • The pattern is stilltillpattern
    • The character is stille
    • Find the nearest one on the lefteThe position of the previous character of the
    • It’s impossible to continue
  • Or is it because it has arrivedeThe position of the previous character of the

    • So you have to go to the lefte
    • So you can continue to look to the left

Direct reverse

Oeasy teaches you to play with VIM - 16 - # inline paste

  • TLean to the left
  • ;Keep direction
  • ,Change direction
  • Reverse is positive

Oeasy teaches you to play with VIM - 16 - # inline paste

Double

  • 2 t o till2ndo
  • ;Keep the search direction unchanged and move forwardtillnexto
  • ,reversetillthe previouso
  • 2 ;Keep the search direction unchanged and move forwardtillTo the secondo
  • 2 ,Change direction,till2ndo

Oeasy teaches you to play with VIM - 16 - # inline paste

summary

  • Close to

    • Lean forward yest
    • Lean back yesT
  • continue

    • Keep the direction;
    • Changing direction is,
  • You can add[count]To accelerate
  • Move left and right in the line, as if it’s over here? What else is there in the back?
  • Next time