:noremap <C-S-Up> V'{j
:noremap <C-S-Down> V'}k
How's that?
What is the ' for? I tried :help v_' and v' (to check ' in visual
mode) but there was no help for that, and ' in regular mode (marks)
does not seem relevant.
--
Dotan Cohen
You're right, it's unnecessary. The '} and '{ are automatic marks that
exist at the end and beginning of the current paragraph. But I
overlooked that you could just use the } and { motions instead.
Didn't have my coffee this morning... :)
Do you really mean parentheses? The commands I posted don't use
parentheses; those are braces. The things you use to delimit code blocks
in C-like languages. If you actually used parentheses, then no, it won't
work as intended.
Are you using GVim or terminal Vim? A lot of terminals won't deal with
modified cursor keys very well. If that's the case for you, you might
have to use a different key combination for the mapping.
Other than that, I don't know what to tell you. It works for me, with
the small exception that it gets confused if you use <C-S-Up> at the
very top of the buffer or <C-S-Down> at the very bottom. That could be
handled by having the mappings call a function which detects those
special cases and handles them differently (basically, by omitting the
`k` and `j` at the end of the normal-mode commands).
Please don't top post.
On Di, 14 Feb 2012, David Gomes wrote:
> On Gvim it works indeed, thanks!
The problem with terminal vim has already been pointed out to you last
time. It is mentioned in the faq. May be you should read it?
regards,
Christian