8 ms·
I'm afraid they'll manage to launch vim and will never be able to get out.
by FranOntanaya 11y ago
I'm afraid they'll manage to launch vim and will never be able to get out.
- creshal 11y agoOr emacs. Or vim inside emacs' terminal emulator.
- oneeyedpigeon 11y agoOrders of magnitude more likely that vi will get launched than emacs :-)
- LukeShu 11y agoUnfortunately, Vi is on the Arch install disc, but Emacs isn't (unless it's changed very recently). Though they of course could install it.
- FreeFull 11y agoThe arch install disk also has vim. The base install of arch doesn't include vim, but does include vi.
- krylon 11y ago> Or vim inside emacs' terminal emulator. I've been there, by accident, two or three times. The first time was really scary, since I did not know vi, yet, and did not know how to exit it or what in the world was going on...
- eloy 11y agoThey should read the book "Popular Unix text editors and how to exit them"
- fisherjeff 11y agoThank you both for inciting a fascinating combination of uncontrollable laughter and existential dread
- scarmig 11y agoquit ? exit ? end ? done ? bye ? quit! ? ^X ? ^C ? ^C ? help ? ? ? ^Z $ killall ed $ vi
- Eupolemos 11y ago:q! https://www.youtube.com/watch?v=AiM5zEEI_Jo https://www.youtube.com/watch?v=AiM5zEEI_Jo
- api 11y agoYou mean that isn't how to exit 'ed'?
- mcguire 11y agoTechnically, the official method of exiting ed, if you're running as root, is: $ed a_file ... (normal usage) r /etc/motd w /boot/vmlinuz-3.19.0-16-generic (replace with specific kernel) !reboot The alternative of "w /dev/sda1" is also acceptable.
- ChrisArgyle 11y ago^D^D should do it
- eru 11y agoCtrl-z works universally, doesn't it?
- ciupicri 11y agoNot really. Some programs disable it including vim (at least on some setups).
- api_or_ipa 11y agoEvery vim I've ever played on has respected `ctrl-z`. In fact, I use `ctrl-z` to jump out of my vim (to restart a server, ls the local dir, etc).
- ciupicri 11y agoMy vimrc has source $VIMRUNTIME/mswin.vim behave mswin which maps Ctrl-z to undo.
- skinnyfoetusboy 11y agoYou monster.
- tomcam 11y agoWell I'll be damned. Never thought of trying it. Thank you.
- emergie 11y agoit doesn't, ctrl-z only suspends process and switches to backgroud - the thing is still alive try ctrl-z and then type bg command - you will see a list, you can resume with fg [number]
- Anderkent 11y agoWell, it might still run but it lets you out of the editor, which is the goal here. You can just kill -9 it afterwards.
- Roodgorf 11y agoI was much too easily convinced that this could be a real book.
- Natanael_L 11y agoWe can make it one! Who'll launch the kickstarter?
- Keyframe 11y agoAccompanied by coffe table book 'Greatest screenshots of ruby in Sublime with dark themes'
- DonHopkins 11y agoNot to be confused with the book "Popular Unix text editors and how to nest them".
- techdragon 11y agoWhich is a book inside a smaller book which is inside a smaller book ...
- gknoy 11y ago... published as a Jupyter notebook of a LaTeX document of a markdown file containing Perl POD comments. ;)
- mgr86 11y agoIt's been awhile since a fresh install but is it ViM. is Vi still around? I just seem to recall some things not working right. Such as not being able to ZZ or ZQ out of a file.
- Gonzih 11y agovi is built-in in arch installation. so...
- valarauca1 11y agoVi is everywhere. Its part of the POSIX standard and comes out of the box (in one flavor or another) with every Linux Distro, OSX, HP-UX, AIX, Solaris, Darwin, FreeBSD, OpenBSD, and DragonFlyBSD. ViM is just Vi iMproved. They share most their keybinds but VIM has the whole plugin architecture thing. This is a big sticking point for a lot of VIM users [1]. If you ever end up on a Unix box that doesn't have VIM, you can always fall back on Vi. [1]: /users/religious fanatics/
- zck 11y agoAt least on Ubuntu, vi is really VIM: zck@zck-desktop:~$ vi --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32)
- xiaodown 11y agoEh, yeah, but it usually links to the "basic" version (which, I assume, is compatibility mode for old school vi). root@dicks:~# which vi /usr/bin/vi root@dicks:~# file /usr/bin/vi /usr/bin/vi: symbolic link to `/etc/alternatives/vi' root@dicks:~# file /etc/alternatives/vi /etc/alternatives/vi: symbolic link to `/usr/bin/vim.basic' root@dicks:~# file /usr/bin/vim.basic /usr/bin/vim.basic: ELF 64-bit LSB executable, x86-64, (snip) root@dicks:~# vi --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32)
- LukeShu 11y ago
- deleted 11y ago[deleted]
- tlrobinson 11y agoPretty sure it will be "rm -rf /"'d by trolls before that.
- PhasmaFelis 11y agoMy "favorite" thing is when you hit Ctrl-C, and Vim says "Type :quit<Enter> to exit Vim". Vim isn't dumb. It knows what Ctrl-C means, it knows what you wanted to happen. But it's gonna make you do it its way anyway, because fuck you.
- pnathan 11y agoMuch like Python Python 2.7.9 (default, Mar 1 2015, 12:57:24) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit >>>
- retbull 11y agothats because you don't want to be using a variable quit and have it suddenly exit.
- koide 11y agoI would think that it's because ViM wants you to learn something about how the it works. If it just exited with Ctrl-C, you'd never get to know about the : magic. Not to mention Ctrl-C is ambiguous. What to do: Exit and save? Exit without saving? What if it's a new file? And probably others I'm not thinking about right now.
- pizzeys 11y agoActually, that's a feature... Ctrl-C exits insert mode. If it quit vim when in Normal mode, you'd accidentally quit Vim all the time. Less annoying to just show a helpful message in case you actually meant quit, than dump everyone who knows what Ctrl-C does back to a shell.
- dllthomas 11y agoI think more important than exiting insert mode is (as I described in a peer comment, hopefully clearly) killing foreground processes you've spawned out of vim. 1) With exiting insert mode there's the option of using escape instead (or capslock or jk or whatever people bind it to), and 2), I think most importantly, with killing processes there's an actual race condition: if the command finishes after I decide to kill it and before vim registers my Ctrl-c, exiting is totally the wrong thing to do.