Author Topic: Vi config  (Read 3764 times)

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Vi config
« on: November 04, 2004, 03:22:49 pm »
Firstly, vi doesn't seem to recognise backspace- it just produces "^?" (in insert mode).

Secondly, whenever I run vi, the status bar at the bottom is wider than the screen and causes it to wrap. Since vi takes up the whole screen, this wrapping adds another line, shifting everything up one line. Since moving around updates the status bar, this shifts everything up again and again until I end up with a real mess. Turning off line wrapping fixes this, but with the small screen I need line wrapping when not using vi. Is there either:
a) a way of telling vi not to bother with the rest of the status bar (preffered method)?
or
 a way of having line wrap turn off automatically when vi starts and on again when it exits?

I am running OZ 3.5.1 Opie on SL-5500 (if that makes any difference).

Thanks
Simon
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

ashikase

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
    • http://
Vi config
« Reply #1 on: November 04, 2004, 08:07:26 pm »
For the backspace problem, in a console, try using the command:
Code: [Select]
stty erase ^?... and then run vi/vim.

If that solves the problem, you can add the following line to one of your rc files (.profile, .bash_profile, .bashrc, etc):
Code: [Select]
stty erase "^?"... note the quotes this time, they are required.

As for the status bar problem, I don't know... I use a (Japanese) build of vim under Cacko Qt, and don't have a problem. To turn off line wrapping, you can try the following command in vi:
Code: [Select]
:set nowrap... I don't know if it will affect the status bar though.

You could also try turning the status bar off (so that it only shows up when needed), using:
Code: [Select]
:set laststatus = 0If you want, you can add either of the above two commands to your ~/.vimrc file.

- ashikase
  anpachi, gifu, japan
« Last Edit: November 04, 2004, 08:07:48 pm by ashikase »
SL-C3100 & SL-C760

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Vi config
« Reply #2 on: November 05, 2004, 11:47:25 am »
To solve your backspace problem add to your .vimrc file

Code: [Select]
set t_kb=^?
to put the ^? control code in vi press control-v then control-backspace.
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Vi config
« Reply #3 on: November 08, 2004, 10:24:29 am »
Thanks for replying.

Is there a vi equivalent to .vimrc?
The stty erase thing didn't work (with or without the quotes), but then backspace problem is specific to vi, it works fine in the rest of the console.
The SL-5500 does not have a control key! For control+c/v/x, fn+c/v/x often works, but it does depend on the program. Fn+backspace is the same as del.

:set laststatus=0
:set t_kb=^?
:set nowrap

did not fix anything either.

Thanks
Simon
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Vi config
« Reply #4 on: November 08, 2004, 10:33:36 am »
I forgot you prob. did not have vim but most likely elvis (type "which vi" at terminal to check.  If you do have elvis there is an equivelent file but I don't know the syntax or location.  Help on elvis can be found at Elvis Help.

Sorry.
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Vi config
« Reply #5 on: November 10, 2004, 11:57:28 am »
'which vi' gives '/bin/vi'
Which suggests to me that it's the original vi, not a clone.
I have no idea where to go from here.
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

Hrw

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Vi config
« Reply #6 on: November 10, 2004, 01:30:55 pm »
it's busybox vi rather - small but working
OpenZaurus 3.5.4x Release Manager
OpenEmbedded, Ångström, Poky developer
My website

Misc embedded hardware.

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Vi config
« Reply #7 on: November 10, 2004, 01:33:09 pm »
oh yeah thanks- i'd forgotten about that.
However i still don't know how to fix the backspace or wrapping problems.
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
Vi config
« Reply #8 on: November 11, 2004, 01:01:10 am »
Quote
oh yeah thanks- i'd forgotten about that.
However i still don't know how to fix the backspace or wrapping problems.
systemparadox,

You might want to install the ipk for vim. I believe I found mine in the 70M apps tar file at
http://www.ecs.soton.ac.uk/~cil103/pub/feed/

Install vim and its doccumentation and then run vimtutor. One of the steps in vimtutor involves
coppying a sample .vimrc file to your home directory.

It worked very well in GPE, but I never figured out how to make my font smaller so I switched to
Opie. There vim also works, but I could not make the terminal app handle syntax highlighting and
still cannot change the font without problems. But if you are using black and white vi, vim should be a step up. With it, I don't have any of the problems you described and have enough functionality that I have stopped trying to fix things for the moment.
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

marina_arata

  • Newbie
  • *
  • Posts: 1
    • View Profile
Vi config
« Reply #9 on: November 18, 2004, 09:39:17 am »
 
The same problem for the the only user "root" in RED HAT AS 3.0

Solution
you must create $HOME/.exrc file like this:

#cat $HOME/.exrc
set t_kb=^?

(where ^? obtained by pressing the backspace key)

# chmod 400 $HOME/.exrc
This is VERY VERY important

---------------------------------------------------------------------------------
We had other problems with backspace using exceed xterm with RED HAT 3.0.
These were solved in this way:


Xconfig -> Keyboard Input -> Italian kbd -> >Edit
click BackSpace key
Unshifted: BackSpace
Shifted: NoSymbol      <---------------------------------------------
ModeSwitch: NoSymbol
ShiftedModeSwitch: NoSymbol
save
restart Xmanager.


Best regards
Marina

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Vi config
« Reply #10 on: November 29, 2004, 11:03:02 am »
i tried it, but it didn't work.
(note: i used vi to make the .exrc file, as "cat $HOME/.exrc" just outputs the contents of .exrc)

out of interest, why is "chmod 400 $HOME/.exrc" so important?
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.