> Reply to message «Re: Tweaking $ command»,
> sent 22:26:44 22 August 2011, Monday
> by AK:
>
>> It does move downward. 3$ moves 2 lines downward, etc.
> Now see this in help. For some reason it was not working before while testing
> (perhaps forgot to add more lines).
>
>> Ok, I see.. but why does map or function have to do anything with that,
>> they already get v:count and v:linenumber1 etc (IIRC), why isn't it up
>> to them to choose how to use or not use them?
> You choose: by<C-u>. I don't like it either: it cost me much time trying to get
> rid of this in<expr> mapping for visual mode.
I think it's also a particularly bad kludge because it's hard for a user
to know what to look for in help system.
>
>>> I don't said it is *applied*. I said it is *reset* when normal-mode
>>> command is executed. `normal' does execute the normal-mode command as
>>> clearly stated by its name.
>>
>> Either reset or applied, I don't see the logic in having that happen
>> with the first normal command in a function.
> I don't rememeber it applied anywhere (though I don't like :normal! very much so
> I can't say I tested this on all commands). On my setup it is simply ignored and
> reset.
>
>>> This won't work for {count}$, see above.
>>
>> ?? It does work for me in Vim 7.3. For both $ and {count}$ .
> vim-7.3.266 (~amd64) USE="X acl bash-completion cscope gpm nls perl python ruby
> vim-pager -debug -minimal", Gentoo
>
> With the following script
>
> vim -u NONE -N \
> --cmd 'exe "fu_()\nnorm!$\nif v:count|exe\"norm\".v:count.\"h\"|en\nendf"' \
> --cmd 'nnoremap $ :<C-u>call _()<CR>' \
> --cmd 'call setline(".", range(100000, 100500))'
Yes, it works fine for me in 7.3 with patches 1-35, 3$, 2$, etc. I
haven't seen the reason to update so far, is there a list of new stuff
in vim dev version? I don't know if I should update just to break my
function :-). -ak
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment