Questions tagged [expression-register]

Questions about the usage of expression register "=

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

Expression register and fractions

I tried to use the arithmetic register with a fraction (7/8) and it returned 0! How do I exert better control over the register so that it gives me what I want? The literal sequence I used, while in ...
1
vote
1answer
24 views

Pasting modified register contents into Visual Block selection

Consider this mapping: vnoremap <leader>U ygv"=toupper(@@)<cr>p It will yank the current visual selection, select it back, and then put a modified version of it. In this case, uppercase ...
1
vote
2answers
47 views

Valid usecases for `=` macro register

I happen to come across the = register. I checked :h @= and :h recording where it is mentioned. I am not able to understand how to use it. It could be helpful to know a valid usecase for the same.
0
votes
1answer
40 views

what is the difference between “* and ”+?

The two registers "* and "+, what is the difference between them? Maybe they are all about OS clipboard?
1
vote
1answer
264 views

How to cmap a local function?

I'd like to reproduce this zsh mapping: smart_dot() { if [[ $LBUFFER = *.. ]]; then LBUFFER+=/.. else LBUFFER+=. fi } zle -N smart_dot bindkey -M viins -- . smart_dot At first I used ...
4
votes
1answer
59 views

Integer overflow when using large numbers with the expression register

I'm trying to multiply two numbers using the Expression Register, but the numbers are pretty big (22,000,001 and 10,000,022), and instead of the correct result (220,000,494,000,022) I get -615802986. ...
6
votes
1answer
157 views

Why is the expression register “read only”?

I was messing with the expression register (:h @=) and noticed that it is not possible to put text directly in it. The doc says: The expression register is read-only; you cannot put text into it. ...