Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: althalus on November 07, 2009, 06:36:45 PM

Title: vim keybindings
Post by: althalus on November 07, 2009, 06:36:45 PM
So it seems that ctrl+ left,right,up, down don't map properly in tinycore.
I would very much like to be able to map these keys in vim.
Instead, pressing those keys inserts the letters a through d above the current line.

Anyone know a solution to this?
Title: Re: vim keybindings
Post by: curaga on November 07, 2009, 06:59:47 PM
Is this is a tty or in X? Do you have a non-US keyboard?
Title: Re: vim keybindings
Post by: althalus on November 07, 2009, 10:17:51 PM
In X, using US layout. It works fine in Linux Mint (which uses xterm) but not in TC (Which appears to se rxvt). I can see via google that rxvt seems to handle ctrl+arrows slightly different to xterm, but nothing that seems to be a solution for vim.
Title: Re: vim keybindings
Post by: jpeters on November 08, 2009, 12:34:07 AM
Arrows work without <ctrl>.  'w' and 'b' will move forward, back by word instead of space.  Puppy uses rxvt, and the ctrl + <-->   act like b/w  . ... probably can be set in .vimrc  

edit:  <shift> + <-->  moves like b/w
Title: Re: vim keybindings
Post by: althalus on November 08, 2009, 01:10:30 AM
Jumping back and forward by word isn't what I want them for. Hm, but puppy has it working? Thanks, I'll see if I can work out how they do it.
Title: Re: vim keybindings
Post by: althalus on December 19, 2009, 07:52:24 AM
Arrows work without <ctrl>.  'w' and 'b' will move forward, back by word instead of space.  Puppy uses rxvt, and the ctrl + <-->   act like b/w  . ... probably can be set in .vimrc  

edit:  <shift> + <-->  moves like b/w

EDIT: Found my solution:
Code: [Select]
map <Esc>Oa <C-W>k
map <Esc>Ob <C-W>j
map <Esc>Oc <C-W>l
map <Esc>Od <C-W>h
This gives me the behaviour I was after. =)
Title: Re: vim keybindings
Post by: jpeters on December 19, 2009, 02:07:26 PM

EDIT: Found my solution:
Code: [Select]
map <Esc>Oa <C-W>k
map <Esc>Ob <C-W>j
map <Esc>Oc <C-W>l
map <Esc>Od <C-W>h
This gives me the behaviour I was after. =)

Cool....glad you got it working!