Author Topic: Help getting started with VIM on GPE  (Read 3061 times)

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
Help getting started with VIM on GPE
« on: October 06, 2004, 07:42:52 pm »
I have installed VIM 6.2, ncurses, and ncurses-terminfo from
http://admin.di.fc.ul.pt/~bsantos/feed/

I am using the x-terminal-emulator that came with the OZ 3.5.1 GPE Rom, which has
color for 'ls' and so on.

But I need a little help before I can continue on my own.

To have the basic functionality I want, I need syntax highlighting in color.
(control of fonts in the xterm would be good too, but thats another topic)

I tried to follow the instructions in the syntax help file ( :help syntax in VIM)
but I could not generated the escape character that they described as
'CTRL-V <ESC>'  
I know <ESC> is the 'cancel' button, but I am not sure I got CTRL-V right.
Also, I could not make the '['  bracket character. The keyboard mapping file that
is mentioned in some posts is now a dead link.  While I am asking about keys,
I also do not have 'arrow' keys while I am editing, instead I get
A
B
C
(depending on which direction I try to arrow)


Since I could not make the characters required for the .vimrc file, I tried running the color test
in item 16 of that helpfile. That gave me an error.

The color test worked on my powerbook.
I also tried copying over my .vimrc file from my powerbook, but it did not change anything.
I tried editing the same test file on both machines, and everything worked right on the powerbook,
but syntax did not even turn on automaticaly on the Zaurus, and when I used :syntax on
I only got black and white highlighting.

I would greatly appreciate any help getting me started with this. From the time I bought this machine, my goal has been text to speech, dvorak input, and a powerful text editor (for LaTeX (dissertation) and HTML). I feel like after months of just what the OZ site warns of, I am almost at the point where I can start getting work done on this machine.
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

jamesm

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://
Help getting started with VIM on GPE
« Reply #1 on: October 07, 2004, 05:16:40 pm »
I have a fairly significant interest in getting vim up and running on my poodle, however I'm running 3.5.1 opie atm so I'll try reflashing to gpe image (which I was going to do anyway) and having a go. (It might finally start wittling that todo list down).

As for the [ characters, with opie I have the luxury of the pickboard menu, so not a problem there, I can't vouch for the same functionality in gpe not having tried it yet.
Victim of c3000 ebay scam.... Now after c3100

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
Help getting started with VIM on GPE
« Reply #2 on: October 07, 2004, 08:51:39 pm »
I can use the virtual input methods, but part of what I am interested in is using the builtin keyboard, which I have modified by gluing textured pieces to the home keys and which I can use fairly well that way.

The key combinations that work with Opie to generate special characters do not work in the console or the text editor.

Fn-shift-comma, for example,  just produces ) , not ].  I am not seeing yet where this is discussed, though
it must be in some FAQ somewhere.
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help getting started with VIM on GPE
« Reply #3 on: October 08, 2004, 06:33:51 am »
This is a good point.

IMO it would be worth mapping one of the (unsused?) Japanese only keys to Ctrl (and the other to something else?) as I've also run across this problem (not with VIM, but still in the console).

I'll bring it up on IRC when I make it to uni later on.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
Help getting started with VIM on GPE
« Reply #4 on: October 08, 2004, 03:19:31 pm »
Thanks Si. Too bad there are no Japanese keys on the 5500 so may have to sacrifice one of the buttons. I guess this means GPE or X cannot map three key combinations?
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help getting started with VIM on GPE
« Reply #5 on: October 09, 2004, 08:57:38 am »
Well on the 5500 and possibly the C machines too (I don't have mine in front of me) c, x and v don't have fn actions so they could just be mapped directly to the ctl- keycodes (I presume). Not sure how it's done though (but I have a feeling it's easier with GPE than with Opie).

No-one replied to my question about the Japanese keys.


Si
« Last Edit: October 09, 2004, 08:58:50 am by lardman »
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
Help getting started with VIM on GPE
« Reply #6 on: October 13, 2004, 06:59:09 pm »
Quote
Well on the 5500 and possibly the C machines too (I don't have mine in front of me) c, x and v don't have fn actions so they could just be mapped directly to the ctl- keycodes (I presume). Not sure how it's done though (but I have a feeling it's easier with GPE than with Opie).

No-one replied to my question about the Japanese keys.


Si
So far I have figured out that the keysym for the Fn key may be Mode_switch, 116.
I don't know yet how key combinations can be mapped. In xmodmap a line like
keysym f = u U means the second item is for the shift combination.  
Adding 7 more letters (ctl, alt, mod1 mod2 mod3 mod4 Mode_switch?) I still had '~' for  Fn c.

Regarding your Japanese key question, if I had an extra key, I cannot immagine a better use
for it on a Linux device than for the Ctrl key. How on earth are people using this without Ctrl?
Emacs is my home environment and I would very much like to be able to ssh from my Z to my servers and work properly. This experience has forced me to get to know and appreciate vim, but there are some specific things for which there is no replacement for emacs on my remote machines (a front end to R using ESS).
 
Do people no longer use a shell?? Let alone emacs. Must we wait for all jobs to end by themselves, or switch to another terminal to kill them?

I hope I can get this figured out on the 5500, but I appreciate your offer to the others since I would hope it would promote the use and testing of terminal based tools making them better ported for all of us.
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
Help getting started with VIM on GPE
« Reply #7 on: October 14, 2004, 05:40:19 pm »
Ok, my main problem is solved, but one still remains.

To get syntax highlighting, make the 'arrows' work, and make the delete key work the following
needs to be in  my .vimrc file:
Code: [Select]
set bs=2

if &term=="vt100" || &term=="rxvt" || &term=="xterm"
        set t_Co=8
        set t_Sf=^[[3%dm
        set t_Sb=^[[4%dm
        set t_mr=^[[00;33;44m
endif

syn on
 

The problems that remain are generating all necessary keys from the builtin keyboard
on an SL5500 under GPE.
Specificaly Ctrl combinations, '[', and ']'.
« Last Edit: October 14, 2004, 05:42:47 pm by panyo »
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
Help getting started with VIM on GPE
« Reply #8 on: October 21, 2004, 10:09:02 pm »
Ok, I have solved this problem.
First getting your keys to work:

The problem was that [ ] { } do not exist. You can get those keys by mapping
three unmapped keys, and one that is arguably not very useful.
 put these lines in a file :
Code: [Select]
keysym F5 = bracketleft
 keysym F6 = bracketright
 keysym F7 = braceleft
 keycode 89 = braceright
that replacs Fn-x, Fn-c, Fn-v, and Fn-<delete> with [ ] { } respectively.
 Also, <Ctrl> is on the callander key.
 Run the file with the keycode and keysyms through xmodmap:
Code: [Select]
xmodmap and re-launch your terminal program and you will have your keys.
This is part of a larger file that I load in my .profile file when I log in to
convert my keyboard to dvorak.

Second, setting up VIM:

The best way to get vim going is to run
Code: [Select]
vimtutorafter installing all the vim files.
In particular, do the step that involves coppying the example vimrc file to your home directory.
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog