Re: Moving cursor on wrapped lines

2007-04-15 Thread Pavel Shevaev

Thanks!

--
Best regards, Pavel


Re: Moving cursor on wrapped lines

2007-04-14 Thread Tim Chase
 Is there any option in vim which reconfigures the behavior of
 up/down buttons so that they move cursor on wrapped virtual
 lines like on real lines?

While I don't believe there's an option per-se, it's very easy to use

:nnoremap up gk
:nnoremap down gj
:vnoremap up gk
:vnoremap down gj
:inoremap up c-ogk
:inoremap down c-ogj

to map the desired effect.  I've seen several folks on the list
who have such mappings.

HTH,

-tim





Re: Moving cursor on wrapped lines

2007-04-14 Thread Ricky Zhou
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pavel Shevaev wrote:
 Is there any option in vim which reconfigures the behavior of up/down
 buttons so that they move cursor on wrapped virtual lines like on
 real lines?
There might be a better way that I don't know of, but this tips page
describes a solution (involving mapping h to gh, etc):
http://www.vim.org/tips/tip.php?tip_id=38

Hope this helps,
Ricky
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGIUexiXbZ7NjlUcARAlAYAJ93728aqpB9v7Vd7GULKH/HmWNRRwCeJ/YH
SCwAzxD52pgkx9cm6BUB8cw=
=k4NY
-END PGP SIGNATURE-


Re: Moving cursor on wrapped lines

2007-04-14 Thread Cyril Slobin

On 4/15/07, Tim Chase [EMAIL PROTECTED] wrote:


While I don't believe there's an option per-se, it's very easy to use

:nnoremap up gk
:nnoremap down gj
:vnoremap up gk
:vnoremap down gj
:inoremap up c-ogk
:inoremap down c-ogj

to map the desired effect.  I've seen several folks on the list
who have such mappings.


This solution has one minor trap: arrows became broken when popup menu
is visible (eg in autocompletion mode). My (better I hope) version of
this idea is:

 Arrows should go into wrapped lines, but not while popup menu is visible
map Down gj
imap expr Down pumvisible() ? Down : C-Ogj

map Up gk
imap expr Up pumvisible() ? Up : C-Ogk

--
Cyril Slobin [EMAIL PROTECTED] `When I use a word,' Humpty Dumpty said,
http://45.free.net/~slobin `it means just what I choose it to mean'


Re: Moving cursor on wrapped lines

2007-04-14 Thread A.J.Mechelynck

Cyril Slobin wrote:

On 4/15/07, Tim Chase [EMAIL PROTECTED] wrote:


While I don't believe there's an option per-se, it's very easy to use

:nnoremap up gk
:nnoremap down gj
:vnoremap up gk
:vnoremap down gj
:inoremap up c-ogk
:inoremap down c-ogj

to map the desired effect.  I've seen several folks on the list
who have such mappings.


This solution has one minor trap: arrows became broken when popup menu
is visible (eg in autocompletion mode). My (better I hope) version of
this idea is:

 Arrows should go into wrapped lines, but not while popup menu is visible
map Down gj
imap expr Down pumvisible() ? Down : C-Ogj

map Up gk
imap expr Up pumvisible() ? Up : C-Ogk



...or use Ctrl-N (Next) and Ctrl-P (Previous) to navigate the 
(insert-completion) popup menu. (For the right-click popup menu, if 
'mousemodel' is set to popup or popup_setpos, hold the right button and 
drag the mouse.)



Best regards,
Tony.
--
Do something unusual today.  Pay a bill.