Vim notes

Column selection:

Ctrl + V

Replace

Replace all A with B

%s/A/B

Find in current line

find <

f<

Remove content between 2 characters

For example, remove the content between [ and ]: [routeName]

{ExampleRoutes[routeName].name}</Text

Vim commands(go to the beginning of the line, find [, delete around ]):

0f[da[

Record/Play Macro command

Begin to record to Macro **d** register

qd

Stop recording

q

For example, remove the content between [ and ], and record them

{ExampleRoutes[routeName].name}</Text
qd0f[da[q

Play the macro:

@d

Play the macro again:

@@

Play the macro in 10 lines below:

10@d

About Tang

A mobile developer, work in Stockholm, Sweden
This entry was posted in Mobile and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s