Live data from Hacker News

How to Exit Vim

github.com

331–340 of 409 posts

Re: How to Exit Vim

#331

One of my Computer Science lecturers had a rule: use Vim for all development for his class whilst on campus, and if caught using any other editor/IDE – or committing any artifacts showing evidence of such – we would lose several percentage points from our final mark for his class. Harsh? Perhaps. But I can’t thank that lecturer enough for that rule. He converted a mostly IDE-wielding class into one that actually appr…

Honestly I really hate being forced to use any particular piece of software and I love vim!

I'm really happy my algorithms professor let me use Makefiles and vim even though the standard tool at the university was (blegh!!!) visual studio.

Re: How to Exit Vim

#332
post #71

First step to quit vim is to accept that you are vim user. Here are some tips: Try to limit yourself to one vim session per day, then one session per week, and so on. Try to replace some Vim sessions with Emacs. Buy notebook with keyboard without Esc key. Install an OS without Vim. Use mouse.

"Buy notebook with keyboard without Esc key."

So now we see what Apple was trying to accomplish with the Touch Bar.

Re: How to Exit Vim

#333
post #71

First step to quit vim is to accept that you are vim user. Here are some tips: Try to limit yourself to one vim session per day, then one session per week, and so on. Try to replace some Vim sessions with Emacs. Buy notebook with keyboard without Esc key. Install an OS without Vim. Use mouse.

>Use mouse.

OMG I use pretty much the default settings in vim but set mouse= is one of the only 2-3 things I put in my vimrc!

The macbook pro and old thinkpads are the only laptop computers with decent built-in pointing devices, all the others always end up coupling with my palms and randomly munging my code!

Re: How to Exit Vim

#334

Earlier quoted context omitted.

'screen' uses C-a as a prefix shortcut so developers of 'tmux' decided to use the next available key to avoid clash.

I don't understand the logic there. In what non-contrived scenario would you run both simultaneously, such that they would conflict? C-a does annoyingly conflict with readline's "move to start of line", though.

At work, my desktop has tmux, but the servers we deploy on only have screen.

Re: How to Exit Vim

#335
post #226
post #95

In the opposing vein, as an Emacs user the best configuration I ever made was to rebind C-x C-c to execute-extended-command instead of kill-emacs. It was way too easy to (even accidentally!) kill emacs with a sweep of a finger. And I probably use a few hundred execute-extended-command calls for each kill-emacs (which I now have to type manually as 'C-x C-c kill-emacs' - no problemo). A similar optimisation was with t…

| However, I've been toying around with the idea | of eventually writing a minimal 'vi' clone that | you cannot exit. I'm sure there's pent-up demand | just waiting for one! If a user space program can be truly unexitable without restarting (including the possibility of killing it through another shell, of course), then would you consider it to be a bug in the operating system? Seems a reasonable conclusion to me.

It would indeed be a bug, which is why any self-respecting operating system should include uninterruptible vi in the kernel /s

Re: How to Exit Vim

#336

Earlier quoted context omitted.

CES hasn’t been relevant in the past decade. Why would we care?

> CES hasn’t been relevant in the past decade. Why would we care? And Vim is? When there are editors like VS Code?

You have just been arrested on suspicion of wrong-think. If this audience loves Vim and you don't, you have landed on the wrong planet and committed a thought-crime.

You don't have to say anything because the HN jury has already found you guilty on multiple accounts of high treason with a thought-crime and the maximum penalty is a lifetime ban.

Re: How to Exit Vim

#337
post #171

- So, how did you learn Vim? I heard there's quite a learning curve. - I just open it, but I couldn't figure out how to quit. Then I have been using it for three years already. (Same applies to Emacs.)

Emacs prompts you to use the tutorial on startup if you haven't configured it.

So does ViM :)

Re: How to Exit Vim

#338
post #319
post #241

Earlier quoted context omitted.

> A similar optimisation was with tmux to bind the prefix to C-z. It's in a handy location next to ctrl and I very rarely use suspend anyway. I think gnu screen has the right idea here: ctrl-a. And you say z is close to control - does that mean you use emacs without shift lock as control?! (I mean sure, still closer than b...).

C-a is the worst default keybinding ever, since like, going to the beginning of a line is one of the most common operations.

In the rest of the universe, going to the beginning/end of the line is mapped to the Home/End keys (fn+left/fn+right on Macs), and I do prefer it when my thing does things in ways that roughly correspond to how the rest of the universe does them if there's no compelling reason to do otherwise.

Re: How to Exit Vim

#339
post #71

First step to quit vim is to accept that you are vim user. Here are some tips: Try to limit yourself to one vim session per day, then one session per week, and so on. Try to replace some Vim sessions with Emacs. Buy notebook with keyboard without Esc key. Install an OS without Vim. Use mouse.

> Try to replace some Vim sessions with Emacs.

Done because I love org mode. What's that? Evil mode? Nah. That's nothin. Ignore it.

Re: How to Exit Vim

#340
post #209

Earlier quoted context omitted.

I disagree completely. When I took CS036 in first year engineering, it was a C++ course that used Visual Studio and while I received a good grade on that course, at the end of it I did not know how to invoke the compiler from the command line. I only knew how to build software from the drop down menu in VS2004 or whatever version it was. IDEs are a crutch.

Sure, but invoking a compiler from a command line is something you can easily pick up from a coworker or an internet tutorial. The primary focus of an intro engineering course is (usually) about the theory and structure of computing, along with general techniques for writing code. Learning about various build tools distracts from that focus. EDIT: Also, you seem to be implying (apologies if I'm wrong) that invoking a…

My intro course used BlueJ, which is (was?) some sort of dumbed down Java IDE specifically for students. The thought was that dealing with all of the crap surrounding software development, like make systems, editors, compiler flags, etc was a distraction from learning basic programming constructs. Looking back I agree completely. As a new programmer, things like compiler flags are pretty much black magic. You don't really learn anything by reciting magic spells.

Learning development tools like the CLI, IDEs, debuggers, linters, et. al. should be required for a CS degree. I don't think an intro course is the right setting.

Post reply on HN