You are not logged in.

#1 2012-10-26 18:00:42

r0ach
Member
From: India
Registered: 2012-10-25
Posts: 11

Why Can't I Type Anything Properly in Vi

Problem: When I backspace, the cursor just goes over the text. Then when I type something new, the text starts getting replaced one by one.

Here's a screencast (less than 1min): http://www.youtube.com/watch?v=16f1nrepZsA

I tried ":set showmode". But the problem persists sad Can someone please help?

P.S: When I used to use Ubuntu, I would simply install Vim in Vi's place and problem gets resolved (by typing 'a'). Now even that doesn't do the trick.

Offline

#2 2012-10-26 18:02:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Why Can't I Type Anything Properly in Vi

Have you tried ':set nocompatible' in vim?

Offline

#3 2012-10-26 18:05:20

r0ach
Member
From: India
Registered: 2012-10-25
Posts: 11

Re: Why Can't I Type Anything Properly in Vi

karol wrote:

Have you tried ':set nocompatible' in vim?

I tried it and this is what I get:

compatible: No such option - "set all" gives all option values

But I noticed something new. Even when I'm typing the command (ie, in command mode), I've the same problem.

Offline

#4 2012-10-26 18:07:33

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Why Can't I Type Anything Properly in Vi

Make sure you're using vim and not vi.  Even if you have vim installed, running 'vi' still starts vi from base.

$ pacman -Si vi
...
Description    : The original ex/vi text editor.

But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2012-10-26 18:10:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Why Can't I Type Anything Properly in Vi

alphaniner wrote:

Make sure you're using vim and not vi.  Even if you have vim installed, running 'vi' still starts vi from base.

+1
I'm pretty sure that error comes from vi - I just tested it and I got an identical one.
vim doesn't error.

Offline

#6 2012-10-26 18:13:21

r0ach
Member
From: India
Registered: 2012-10-25
Posts: 11

Re: Why Can't I Type Anything Properly in Vi

alphaniner wrote:

Make sure you're using vim and not vi.  Even if you have vim installed, running 'vi' still starts vi from base.

$ pacman -Si vi
...
Description    : The original ex/vi text editor.

So basically, vi, which is provided with every other distro is useless. Just out of curiosity, I really want to find a solution, you know smile

Last edited by r0ach (2012-10-26 18:13:42)

Offline

#7 2012-10-26 18:15:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Why Can't I Type Anything Properly in Vi

Why 'useless'? 'x' deletes, right? Why do you need backspace'?

Offline

#8 2012-10-26 18:17:32

r0ach
Member
From: India
Registered: 2012-10-25
Posts: 11

Re: Why Can't I Type Anything Properly in Vi

karol wrote:

Why 'useless'? 'x' deletes, right? Why do you need backspace'?

Its quite a hassle to download a whole new package to get backspace functionality. I mean, most of the computers at my lab doesn't have internet connectivity sad

Offline

#9 2012-10-26 18:18:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Why Can't I Type Anything Properly in Vi

r0ach wrote:
alphaniner wrote:

Make sure you're using vim and not vi.  Even if you have vim installed, running 'vi' still starts vi from base.

$ pacman -Si vi
...
Description    : The original ex/vi text editor.

So basically, vi, which is provided with every other distro is useless.


No, newbies use it for generating entropy and random strings smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2012-10-26 18:19:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Why Can't I Type Anything Properly in Vi

But why don't you use vi commands? What is the problem with 'dd', 'x' etc.? These should work out of the box on both vi and vim.

Using Arch on computers w/o internet connectivity is a weird idea - updating is a PITA.

Offline

#11 2012-10-26 18:19:26

r0ach
Member
From: India
Registered: 2012-10-25
Posts: 11

Re: Why Can't I Type Anything Properly in Vi

Guess, nano is the way to go!

Offline

#12 2012-10-26 18:30:23

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Why Can't I Type Anything Properly in Vi

If you enter insert mode, type some stuff, backspace to delete it, then press escape, the characters you 'backspaced' will disappear.  But only in that situation.

For my part I kind of agree with you about vi.  I love vim but hate vi, and I find it hard to understand how vi lasted long enough to inspire vim.  But then I've never really tried to learn/adapt to it...

Last edited by alphaniner (2012-10-26 18:31:26)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#13 2012-10-26 18:36:56

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Why Can't I Type Anything Properly in Vi

r0ach wrote:

Guess, nano is the way to go!

If you just want to edit a config file or two, nano may just be the easier choice, especially if you are using many computers where you don't have control over what's installed. Nano is almost always available, and it's actually quite a usable editor.

Offline

#14 2012-10-26 23:19:29

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Why Can't I Type Anything Properly in Vi

Arch uses ex/vi for vi, not the vi build of vim: https://bugs.archlinux.org/task/20778 and http://ex-vi.sourceforge.net/.

You can use vim as the default editor by setting the EDITOR environment variable in your startup configs.  And, I guess, break the habit of typing 'vi' when you really mean vim.

Offline

#15 2012-10-27 03:40:26

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: Why Can't I Type Anything Properly in Vi

thisoldman wrote:

Arch uses ex/vi for vi, not the vi build of vim: https://bugs.archlinux.org/task/20778 and http://ex-vi.sourceforge.net/.

And, I guess, break the habit of typing 'vi' when you really mean vim.

Could alias it. I do as it's one less letter and I am lazy.

Offline

#16 2012-10-27 16:24:50

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Why Can't I Type Anything Properly in Vi

Or you could just uninstall vi, if you wish.

Offline

#17 2012-10-27 17:04:48

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Why Can't I Type Anything Properly in Vi

The vim-runtime package has an example vimrc file. Have a look at that as well, as vim does not come with vim by default :-)

Offline

#18 2012-10-27 17:36:19

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Why Can't I Type Anything Properly in Vi

Awebb wrote:

The vim-runtime package has an example vimrc file. Have a look at that as well, as vim does not come with vim by default :-)

Yes, it comes with emacs these days tongue

Offline

#19 2012-10-27 17:37:42

Steffo
Member
Registered: 2012-10-27
Posts: 34

Re: Why Can't I Type Anything Properly in Vi

I've done this (quote from memory):

ln -fs /usr/vi /usr/vim

Last edited by Steffo (2012-10-27 17:38:10)

Offline

#20 2012-10-27 21:39:36

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Why Can't I Type Anything Properly in Vi

Steffo wrote:

I've done this (quote from memory):

ln -fs /usr/vi /usr/vim

Better not quote from memory next time...


ᶘ ᵒᴥᵒᶅ

Offline

#21 2012-10-28 02:49:51

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: Why Can't I Type Anything Properly in Vi

I'm another who hates vi but loves vim. In vi, backspace results in "^?". In vim it just works. And why does insert mode overwrite rather than, you know, inserting?

The only way I can edit in vi is to use substitutions in command mode. Directly typing, deleting or changing text is completely beyond me.

I assume this is because I've never learnt it properly because, well, there's the wonderful vim...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB