Very cool tip about text objects

18 views
Skip to first unread message

aditya siram

unread,
Nov 2, 2012, 10:26:15 AM11/2/12
to vim-...@googlegroups.com

aditya siram

unread,
Nov 2, 2012, 10:43:31 AM11/2/12
to vim-...@googlegroups.com
I was futzing around with the above tip and found some interesting text object behavior. Given the following snippet:
" {
     "inner quote"
  }

if point is on is somewhere between the `"` on the first line and the one starting `"inner quote"` on the second, doing `ya"` will yank `"inner quote"` as per the tip above and not what I expected:
`" {
      "
however if the snippet is all on the same line:
" {  "inner quote" }
doing `yaw` correctly yanks `" {  "`.

In fact if the quotes span multiple lines `yaw` doesn't do anything at all for example with this snippet:
" {
     "

Is there some reason for this?
-deech

On Friday, November 2, 2012 9:26:15 AM UTC-5, aditya siram wrote:
http://www.reddit.com/r/vim/comments/12do2u/vim_isnt_about_speed/c6ubal4

Michele Berg

unread,
Nov 2, 2012, 10:45:53 AM11/2/12
to vim-...@googlegroups.com
Great article, thanks for sharing.

Michele


Reply all
Reply to author
Forward
0 new messages