sjl / learnvimscriptthehardway

Home Page:http://learnvimscriptthehardway.stevelosh.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chapter 33: @@ is not the unnamed register

colwem opened this issue · comments

The final line of the function echoes the variable @@. Remember that variables starting with an @ are registers. @@ is the "unnamed" register: the one that Vim places text into when you yank or delete without specify a particular register.

Pretty sure this isn't correct. The unnamed register is @". Not sure what you call @@ but it's like the "repeat last register" register.

Actually looking it up I guess @@ is also the unnamed register when used as an expression. That being said I think maybe an explanation of this is needed. Though I guess you might have explained this earlier but I just skimmed through some of the earlier chapters because I already knew almost all of it.

Also I made this mistake because I looked up :h @@ and :h :@@ and :h registers etc. and I couldn't find anything mentioning @@ being the unnamed register. It turns out it's in :h expr-register. Maybe put :h expr-register in the exercises section?