Vi commands -- help

software development


It’s a small problem, but a REALLY annoying one: on all the other servers I’ve worked with, the “delete” key in vi deletes one character at the cursor (whether you’re in INSERT mode or out of it). On all of Dreamhost’s servers (at least on patton, dollar, and deblume), the delete key acts as a backspace. This makes editing REALLY cumbersome and slow at times. Furthermore, the yank command gets capped at 50 lines, which makes copying and pasting large amounts of text a real hassle. So, my question is twofold:

  1. Can I change vi’s config myself? Or is this feature disabled because a change would be server-wide for all users?

  2. If I can change it, where do I do this… I’ve run the :set all command to view what settings can be changed, but I don’t know how to change anything!

Thanks, any advice would be appreciated.



If you’re using vim (this may or may not be the default “vi” on your machine), .vimrc is where you change the config. Otherwise, for nvi, (IIRC) .exrc is it.

Can you see if putting this in your .vimrc fixes your backspace problem?

set t_kD=^V

(pretty sure that’s not a literal control-V, but caret-capital-V)

How are you yanking lines? I’m not seeing any problems with that on one of the machines I’m on.


you can store your settings in ~/.vimrc

ie —
syntax enable
:set ignorecase
:set nohlsearch


On debian originally was installed elvis on default not vi… on fud this is the case… so if you are more attracted to the user friendly mapping type vim instead of vi… but who knows may your case be different :wink:


thanks – it was a combination of all your suggestions. there was no .vimrc file, so i had to create one. and after some trial and error the command is:

:set t_dK=^ (NOT a literal ^, but rather Ctrl+Delete)

as for the yanking problem, it’s a matter of upping the buffer default in .vimrc:

:set viminfo='20,"50 (default, buffer maxes out at 50 lines)
:set viminfo='20,"100 (buffer maxes out at 100 lines)

thanks for your help!!