Vim is not working

Hello
I can t use vim,I got the Uganda page and for help a very little txt.And a lot of help txt files cannot open any.I try insert nothing goes.
I see in .bashrc that I have to choose and uncomment the vim editor used ?
But how can I do that?

On Thu, 06 Jun 2013 15:46:02 +0000, laskachien wrote:

> Hello I can t use vim,I got the Uganda page and for help a very little
> txt.And a lot of help txt files cannot open any.I try insert nothing
> goes.
> I see in .bashrc that I have to choose and uncomment the vim editor used
> ?
> But how can I do that?

What version of openSUSE are you using?

To insert in vim, press ‘i’.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

In addition to Jim’s suggestion, you may want to try this before trying to use Vim:


sh-4.2$ vimtutor

… this is the first step towards Nirvana :).

On 06/06/2013 06:42 PM, flymail wrote:
> this is the first step towards Nirvana

maybe the first step on your machine, but on mine i get:


denverd@linux-os114:~> sh-4.2$ vimtutor
If 'sh-4.2$' is not a typo you can use command-not-found to lookup
the package that contains it, like this:
cnf sh-4.2$
denverd@linux-os114:~>

i think the OP might use one or both of these, one at a time:


info vim
vimtutor

:slight_smile:

otoh, i’m not a masochist so i recommend mc instead of vim…of
course i wouldn’t wanna start a flame war, especially not with folks
who might use the woefully deficient Vi IMproved :>


dd

On 2013-06-06 17:46, laskachien wrote:
>
> Hello
> I can t use vim,I got the Uganda page and for help a very little
> txt.And a lot of help txt files cannot open any.I try insert nothing
> goes.
> I see in .bashrc that I have to choose and uncomment the vim editor
> used ?
> But how can I do that?

You can use any editor you like to edit “~/.bashrc” and add an “EDITOR” environment var.

Text mode: joe (and its callnames), mcedit, pico, nano. Also emacs and vi.

Graphic mode: kedit, gedit, leafpad… not forgetting emacs (dunno if vi has a graphic counterpart)


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

On 2013-06-06, dd <DenverD@no-mx.forums.opensuse.org> wrote:
>


> denverd@linux-os114:~> sh-4.2$ vimtutor
> If 'sh-4.2$' is not a typo you can use command-not-found to lookup
> the package that contains it, like this:
>      cnf sh-4.2$
> denverd@linux-os114:~>
> 

Just for you dd, try this:


denverd@linux-os114:~> /bin/sh

and you will see what I mean.

I use Vim for NNTP posts. And so sh-4.2$ is my standard shell prompt (after running :!/bin/sh/ in NORMAL mode). But I
guess you knew that…

On 2013-06-06, Carlos E. R. <robin_listas@no-mx.forums.opensuse.org> wrote:
> (dunno if vi has a graphic counterpart)

The closest GUI version is gVim.

On 2013-06-06, Carlos E. R. <robin_listas@no-mx.forums.opensuse.org> wrote:
> Graphic mode: kedit, gedit, leafpad… not forgetting emacs (dunno if vi has a graphic counterpart)

I thought the graphical version of emacs is XEmacs?

On 2013-06-06 20:01, flymail wrote:
> On 2013-06-06, Carlos E. R. <robin_listas@no-mx.forums.opensuse.org> wrote:
>> Graphic mode: kedit, gedit, leafpad… not forgetting emacs (dunno if vi has a graphic counterpart)
>
> I thought the graphical version of emacs is XEmacs?

Possibly. I don’t have it installed in this small test system, so I can’t verify; but IIRC, calling
“emacs” directly in GUI works. It is possibly redirected. Will try later if I remember.


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

On 2013-06-06, dd <DenverD@no-mx.forums.opensuse.org> wrote:
> otoh, i’m not a masochist so i recommend mc instead of vim…of
> course i wouldn’t wanna start a flame war, especially not with folks
> who might use the woefully deficient Vi IMproved :>

It’s interesting nowadays that the most disparaging comments made about Vim tend not to come so much from Emacs fans but
from those who use neither. Perhaps it’s a manifestion of some underlying insecurity complex :).

Vi(m) has quite a learning curve, not similar to many common editors. When you’re in a terminal window, accessing a folder where a file needs editing you can easily run a desktop editor


kwrite filename

(KDE)
or


gedit filename

(GNOME)

If system files (i.e. owned by root)


kdesu kwrite filename

(KDE)
or


gnomesu gedit filename

(GNOME)

Here’s a basic tutorial on vim: Short Introduction to the Vi Editor

On 06/07/2013 09:57 AM, flymail wrote:
> Perhaps it’s a manifestion of some underlying insecurity complex:).

or a “size thing”…some folks just must have the big learning
task…whereas mc and all those wonderfully easy (small learning
needs) ways to simply pop open an efficient gui editor (as ‘Knurpht’
rightly points out) are just not manly enough, for some!! :wink:

personally, (very secure complex) i use KWrite about as often as
mc…seldom use emacs and never vi/vim which is horribly, and
unnecessarily complex in today’s computing.


dd

On 2013-06-07 09:57, flymail wrote:
> On 2013-06-06, dd <DenverD@no-mx.forums.opensuse.org> wrote:
>> otoh, i’m not a masochist so i recommend mc instead of vim…of
>> course i wouldn’t wanna start a flame war, especially not with folks
>> who might use the woefully deficient Vi IMproved :>
>
> It’s interesting nowadays that the most disparaging comments made about Vim tend not to come so much from Emacs fans but
> from those who use neither. Perhaps it’s a manifestion of some underlying insecurity complex :).

Vim is difficult to use.
VERY difficult, actually.

I have seen people starting it to edit a file, then don’t know how to go on, it will not accept any
typed letter you try, perhaps you get not what you wanted, then you want to quit, and you can’t.

Finally they have to reboot the computer because nothing works!

This is no phantasy - it happened to me. January 1998, I remember. I did not actually reboot the
computer, I just clicked in Windows (it was a remote ssh session to a server) to close the window,
then open another ssh terminal. Then I found out how to do it with man. I did not know I could have
two opened ssh sessions at the time, one to read the manual (or worse: it can happen on the initial
text mode, no graphics available, and you don’t know that you have 6 terminals → reboot to get out).

It is not obvious - there is no help menu - that to quit you have to type “:q!”, or that to edit,
you have to type “i”, and then ESC:wq to save and exit. It is not obvious that there is a command
mode, and an edit mode.

You have to read the man page first.

Me, coming from Windows NT, first contact with the unix/linux world, learned to run away from vi on
sight. About the first thing I learned. I found out emacs, and this at least I could manage (and
dislike almost as profoundly). At least it had some type of menu and help. Often what I did was
bring the file to Windows and edit it there, then copy it back - which may fail because line end
formatting is different.

People that persevere and learn to use any of those two editors say that they are very powerful. I
think that they are so powerful than it compensates the difficulty. And I believe them. I believe
them, but nevertheless, I refuse to invest that effort, I prefer my known, GUI, editors. Plus two
simple editor on text mode: joe and mcedit. As a programmer, what I prefer is a Borland type of IDE,
I know most of the shortcuts by memory. It is based on the old CP/M WordStar. In Linux, jstar is
that type, simplified.

And the other curious thing that we soon learn, is that there are vi power users that hate emacs,
and emacs power users that hate vi. There have been memorable flame wars around these two groups.

There is no insecurity complex at all. I recognize vim is very powerful. I have tried it, and will
not use it - unless they actually pay me to.


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

I ‘grew’ up with headless ( no desktop ) UNIX, with nothing but vi, and I still use it for basic editing. But I wouldn’t even think about writing php in it. For development, Kate is my choice.

Carlos E. R. wrote:
> Vim is difficult to use.
> VERY difficult, actually.

Not difficult at all if you already know vi :slight_smile:

> It is not obvious - there is no help menu - that to quit you have to type “:q!”, or that to edit,
> you have to type “i”, and then ESC:wq to save and exit. It is not obvious that there is a command
> mode, and an edit mode.

Nonsense! When you just type ‘vim’ into your shell it shows you a screen
that tells you both how to quit and how to get help.

> You have to read the man page first.

No, you don’t, but I do agree that it is a good idea to read the man
page before using any command-line program.

Now if you want a scary program to use, I give you bash …

Knurpht wrote:
> I ‘grew’ up with headless ( no desktop ) UNIX, with nothing but vi, and
> I still use it for basic editing. But I wouldn’t even think about
> writing php in it. For development, Kate is my choice.

I wouldn’t even think about writing PHP using any editor :slight_smile:

I do write all my perl using vim. I tried a couple of IDEs but couldn’t
see the point. Twenty terminals with a vim in each. A couple more for
random command-line things. And icewm to tie it all together. Oh, and a
browser nowadays.

On 2013-06-07, dd <DenverD@no-mx.forums.opensuse.org> wrote:
> On 06/07/2013 09:57 AM, flymail wrote:
>> Perhaps it’s a manifestion of some underlying insecurity complex:).
>
> or a “size thing”…some folks just must have the big learning
> task…

That may be the case, but I would never describe your-preferred KWrite' as woefully deficient’ as you have for Vim
(although I prefer Kate over KWrite), because I harbour no such insecurities :D.

On 2013-06-07, dd <DenverD@no-mx.forums.opensuse.org> wrote:
> …seldom use emacs and never vi/vim which is horribly, and
> unnecessarily complex in today’s computing.

Indeed I recommend new users not to use Vim or Emacs, even though I only use Vim. The only limitation with GUI editors
is that they’re not good for console-only things (like ssh) and even then I recommend new users use nano because it’s
more beginner friendly. What I can say about however is that if the following conditions are met…

  1. You can ten-finger type without having to look at the keyboard.
  2. You’ve used Vim to the extent where you invoke commands by following keystrokes on autopilot without even thinking
    about (and certainly not looking at!) the keys, but the fingers just `do it’ automatically.
  3. You’ve fine-tuned your ~/.vimrc to almost every editor environment you’re likely to encounter according to your
    personal tastes.

…then you will find yourself more inefficient on a non-Vi-type editor. But I’d agree with anyone who thinks that the
investment is not worthwhile for most people. Nonetheless, that’s no reason to demonise it or call it `woefully
deficient’ because for some people (like me), Vim makes Linux so much more of a pleasure to use.

On 2013-06-07 12:22, Dave Howorth wrote:
> Carlos E. R. wrote:
>> Vim is difficult to use.
>> VERY difficult, actually.
>
> Not difficult at all if you already know vi :slight_smile:

Ha, ha.

>> It is not obvious - there is no help menu - that to quit you have to type “:q!”, or that to edit,
>> you have to type “i”, and then ESC:wq to save and exit. It is not obvious that there is a command
>> mode, and an edit mode.
>
> Nonsense! When you just type ‘vim’ into your shell it shows you a screen
> that tells you both how to quit and how to get help.

Nope, it doesn’t. I tried before posting.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2013-06-06 20:01, flymail wrote:
> On 2013-06-06, Carlos E. R. <robin_listas@no-mx.forums.opensuse.org> wrote:
>> Graphic mode: kedit, gedit, leafpad… not forgetting emacs (dunno if vi has a graphic counterpart)
>
> I thought the graphical version of emacs is XEmacs?

In this laptop emacs is installed. If I run it in text mode I get a CLI,
if in GUI I get a GUI. It detects the environment.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2013-06-07 12:43, flymail wrote:

> more beginner friendly. What I can say about however is that if the following conditions are met…
>
> 1. You can ten-finger type without having to look at the keyboard.

I can.

Which means I can use wordstar commands without thinking about them or
looking at the keyboard. WordStar was designed from the start for good
typists, using a keyboard without looking at it (no mouse needed, no
drop-down menus). Just control-key combos.

In Linux, the closed to that is “jstar”.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))