I first gained access to a UNIXish system in the fall of 1988, which was some SunOS4.x variant I believe. The shell was csh, the editor was vi, and I had no idea what I was doing, nor was there any help in my immediate area to be found. And no, I didn't know about 'man' yet. Somehow I discovered that 'vi' was the way to edit things, but I didn't know how to exit, so trial and error led me to pressing control and z at…
How to Exit Vim
391–400 of 409 posts
Re: How to Exit Vim
#392Earlier quoted context omitted.
An interface lacking discoverability is a bad interface.
Once you learn the tool, discoverability wastes screen space and user focus. It's like training wheels, at some point you want them off or they slow you down. I'm not a vim user, I just appreciate the UI trade-offs made by its devs.
Re: How to Exit Vim
#393First 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.
Re: How to Exit Vim
#394Earlier quoted context omitted.
I would do as they said if they convinced me that they had sound reasons for the choice. I don't think they'd be able to come up with sound reasons for dictating vi specifically, over a more lenient requirement, though. And being dictated to like that without sound reasoning behind it would instantly make me rebel. Unlike the other commenter, I would not do so quietly - I'd be more likely to make sure to use whatever…
I just sat through a two day training/workshop session called "Design Thinking" during which we learned about techniques to interview stakeholders, and how to empathize with their needs and concerns (specifically without solving the problem at hand, or trying to solve it.) My perception is that I am closer to the problem than most of the other classroom participants, and I have more than enough experience to solve it…
If the point of the course had been to learn vi, or the teacher had given a compelling reason for why specifically vi, rather than less specific instructions, then I might have accepted that if their reasons were good enough.
Re: How to Exit Vim
#395- 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.)
The accepted answer here [1] is what got me to see the light. Once I realized how composable the main commands are, vi became kind of fun. I still prefer Emacs because of macros and org-mode, but I no longer fear vi when I'm doing a quick edit, editing a huge file, or on a emacsless new machine. [1] https://stackoverflow.com/questions/1218390/what-is-your-mos...
Re: How to Exit Vim
#396First 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.
Won't help. True addicts know of C-[.
Re: How to Exit Vim
#397Earlier quoted context omitted.
> particular dated editor I wonder how you feel about age discrimination. Old != bad. I started using Vim when I was 14; I was the only one in the class who wasn't using an IDE. Vim (perhaps combined with a language server if you're okay with the complexity) runs circles around bloated IDEs like IntelliJ/VSCode. Unix combined with a tiling WM is the best IDE in existence. The professor in question is likely doing the…
Cool, I use nano. Should I be penalized?
What I was trying to say was that if minimal solutions run circles around bloated ones thousands of times their size, and when it takes a startup and two funding rounds to develop something that does exactly what tools did three decades ago less efficiently, then maybe Braithwaite was on to something:
> “It’s a curious thing about our industry: not only do we not learn from our mistakes, we also don’t learn from our successes.” -- Keith Braithwaite
Re: How to Exit Vim
#398In 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…
Re: How to Exit Vim
#399First 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.
Re: How to Exit Vim
#400Earlier quoted context omitted.
command wq command w command q
Unfortunately: E183: User defined commands must start with an uppercase letter
cabbrev w =(getcmdtype()==':' && getcmdpos()==1 ? 'W' : 'w')
cabbrev q =(getcmdtype()==':' && getcmdpos()==1 ? 'W' : 'q')
cabbrev q! =(getcmdtype()==':' && getcmdpos()==1 ? 'W' : 'q!')
cabbrev wq =(getcmdtype()==':' && getcmdpos()==1 ? 'W' : 'wq')