-8

I'm really frustrated with vim (I'm using macvim). The frustration comes when I want to enter the insert mode. I click in an area and sometimes it goes into another mode, visual insert or something like that.

Sometimes when I click to select text and I try to go into insert mode to start rewriting over the selected text, this doesn't work or the entire line gets deleted.

And when it does go into insert mode, the cursor moves to the left instead of the right, so I always have to readjust it. That means if I start the cursor at the end of the line: System.out.print(); because I want to add let's say a comment, the cursor will end up between the ); instead of to the right of it and I always have to move it first.

These are some of the frustrations. Everyone said that vim is so wonderful, but I'm starting to feel like it's more of a pain than it's worth.

I don't know what I'm doing wrong. I must not be getting it or understanding something about it. Any thoughts?

Sarah
  • 19
  • 1
  • 3
  • 1
    _And when it does go into insert mode, the cursor moves to the left instead of the right, so I always have to readjust it._ Are you using "a"? – Chris Forrence Dec 12 '17 at 21:30
  • 4
    Start by learning to use `vim` without your mouse. – chepner Dec 12 '17 at 21:31
  • Force yourself not to use the mouse! You will learn Vim's navigation shortcuts better that way. Also, Vim is designed to be inefficient, you're supposed to glue together lots of strange tricks to navigate files. This glueing of slow commands means Vim is more configurable, but harder to use than a modern editor. – Andy Ray Dec 12 '17 at 21:32
  • What do you mean am I using 'a'? I use 'i' to go into insert. How do I use vim without the mouse? – Sarah Dec 12 '17 at 21:33
  • 1
    Well, "i" starts the insertion before the cursor, and "a" starts the insertion after the cursor. [This cheat sheet](https://vim.rtorr.com/) might be handy! – Chris Forrence Dec 12 '17 at 21:34
  • 1
    Also, `A` starts inserting at the end of the current line. – melpomene Dec 12 '17 at 21:38
  • Ok, yea that helps. Didn't realise 'a' is for insert on the right. Any other important tips I should know about? – Sarah Dec 12 '17 at 21:42
  • 1
    Yeah, don't ask non-programming questions on StackOverflow. – melpomene Dec 12 '17 at 21:45
  • @melpomene, I somewhat disagree. Vim is a tool used primarily for programming, which disqualifies the off-topic close reason (general usage) – Chris Forrence Dec 12 '17 at 21:50
  • 1
    @ChrisForrence I disagree that vim is primarily a programming tool. I think it's primarily a text editor (which can be programmed and used for writing programs, but neither are the focus of this question). – melpomene Dec 12 '17 at 23:03
  • try https://vim-adventures.com/ for learning vim. Learn to not touch your mouse or any arrow keys. – Keith Nicholas Dec 12 '17 at 23:03
  • Did you use vimtutor to start? It sounds like you skipped that thirty minute intro. – dash-tom-bang Dec 13 '17 at 01:44
  • 1
    @AndyRay vim is not designed to be inefficient, the opposite is true, it's designed (in a very different way then most editors) to be more efficient. – snap Dec 13 '17 at 06:54
  • Vim is a text editor, not a code editor. It's designed to glue small commands together to do simple navigation, like `10j`, `/word`, `Tf;;` etc, which are composable for doing large repetitive tasks, but intentionally inefficient for day to day navigating. – Andy Ray Dec 13 '17 at 15:34

2 Answers2

7

I agree with the commenters that you should learn vim first before mucking it up with a GUI. At least this way you will have an idea of what it should be doing if the GUI screws something up, which they sometimes do.

Vim is a powerful tool, but it does have a learning curve. It is not intuitive enough to just jump in and start using it. Some specific effort to learn it is required to use it even at a basic level.

2 great places to start is the vimtutor terminal program or the online game VimAdventures.

I found another one that also looks good at first glance: VimTutor+.

virullius
  • 939
  • 6
  • 17
  • I started with vim from beginning, never used anything else, so I hate to start over with another. Vim does have some great features I really like. – Sarah Dec 12 '17 at 21:40
  • The recommended options are part of learning the basics of Vim. Just type `vimtutor` on a command line and follow the instructions. You'll see learn the difference between `a` and `i` pretty early on and you'll learn how to avoid the mouse even more generally throughout the whole thing. (Moving with the mouse is slow and imprecise; Vim has a lot of other tools for navigating that are far superior.) – dash-tom-bang Dec 13 '17 at 01:48
1

I would really recommend going through the not-so-much-fun, but all-so-useful vimtutor. I felt the same way as you did when starting, but once you know how to use it, you can't stop using it.

Also, forget the mouse. vim was designed entirely at a time where mice were not around, and it's with a keyboard that you can use it as it was intended to in the first place.

Gunee
  • 431
  • 3
  • 16