how to understand below vim script entries? -
question 1: know bash script let var = value
, how understand mean of below grammar under vim?
let g:counter += 1 return g:counter . '. '
question 2: what’s means '<c-\>^>'
, key sequence in vim?
map '<c-\>^>'
i want append question, please forgive me,
the vim key map
map <c-\>^] :gtagscursor<cr>
i press key ctrl-\
shift-.
, press ]
doesn't work, what's matter?
question 1:
the 2 lines should in function
. otherwise return
doesn't make sense.
also global variable g:counter
should defined.
then first line, same as:
let g:counter = g:counter+1
so increment variable g:counter
1
.
the 2nd line:
return g:counter . '. '
for example, after increment, variable value 10, line returns string 10. (space)
the first dot concatenates 2 strings. first string variable value, converted string type automatically. , second string '. '
question 2:
map <c-\>^>
note took single quote map command away.
the key sequence is:
ctrl-\shift-6shift-.
shift-6 ^
shift-. >
Comments
Post a Comment