Here is a mapping
map <silent> <2-LeftMouse> lB"gyE :if @g=~'ss\d\d\d\.png' :call writefile([@g], "/home/g/xv.vss", "a") :elseif @g=~'http' :call writefile([@g], "/home/g/dil.lo", "a") :elseif @g=~'_\d\+' :let @/='^'.@g.'$' :norm nzz :elseif @g=~'\a\+' :vim /^\cg/ /mnt/1/dict/webster/all.txt :else :norm 0y$:@" :endif
Here is the content of "g
Here are the messages produced when the mapping ran
E303: Unable to open swap file for "=substitute(submatch(0),'/", recovery impossible Cannot open file "=substitute(submatch(0),'/" "all.txt" 530590 lines --0%--
Apparently vim considers the content of
"g is equivalent to
\a\+ because it duly opened
all.txt and tried to find a match in it (webster's dictionary) to
@g and the only route to that file is thru the mentioned test.
Could anyone explain to me why it does this, or an alternative interpretation?