>>> I got it working with:
>>>
>>> :nnoremap<silent> $ :<c-u>exec 'norm
>>> '.((virtcol('$')-v:count)<0?0:(virtcol('$')-v:count)).'<bar>'<cr>
>>
>> Thanks, but that doesn't work right for me without the count (vim 7.3).
>> I think the function version is preferable for readability, as well. -ak
>
> I'm not sure what you mean about it not working right without the
> count. Without the count, it just acts like "$" normally does (with the
> small exception that Vim remembers that it's in column-X instead of
> at-the-EOL, so subsequent vertical movements such as j/k stay in the
> same column instead of jumping raggedly to the EOL on each line).
>
> -tim
When I pasted into vim, somehow a single trailing space got added and it
made '$' command go one line down, for some reason I don't understand.
After fixing, it does work fine.
-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