Let's say I have this line in a file:
1. keep the cursor on '
2. type ct" (which means change till (the first)
3. type request served.
Recently I figured there's an easier/faster way:
1. keep the cursor anywhere inside the
2. type ci" (which means change inside quotes)
3. type request served.
Like every Vim feature, this is just one among a dozen or so possible selections. Check out text objects section in Vim manual.
and I want to change it to:logging.info("some boring message")
For a long time I did it this way:logging.info("request served")
1. keep the cursor on '
s
' of 'some
'2. type ct" (which means change till (the first)
"
character)3. type request served.
Recently I figured there's an easier/faster way:
1. keep the cursor anywhere inside the
"some boring message"
string2. type ci" (which means change inside quotes)
3. type request served.
Like every Vim feature, this is just one among a dozen or so possible selections. Check out text objects section in Vim manual.
No comments:
Post a Comment