quit
?
exit
?
end
?
done
?
bye
?
quit!
?
^X
?
^C
?
^C
?
help
?
?
?
^Z
$ killall ed
$ vi $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.[Fixed in the great-grandparent.]
eat flaming death
?
http://www.gnu.org/fun/jokes/ed-msg.txt source $VIMRUNTIME/mswin.vim
behave mswin
which maps Ctrl-z to undo.Legend has it that, if you do, you bring on the Singularity immediately.
$ jobs
[4] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[5] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[6] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[7] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[8] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[9] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[10] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[11] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[12]- Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[13]+ Stopped emacsclient -a '' -nw [redacted]
But since they're all emacsclients it doesn't really matter. /private/tmp/foo.txt locked by jnpatel@mac... (pid 14836): (s, q, p, ?)?
because of the lock files? emacs --daemon
Then run emacsclient to connect to it (open a new buffer in the daemon and switch to it): emacsclient -nw some_file
When you "quit" (with C-x C-c), it really just quits that client, but the main emacs is left running.This has a number of benefits: 1) no locks like you mention, 2) access to all open buffers (even unsaved) from every emacsclient that's currently running (since they're really all just opening buffers in a single instance), 3) blazing startup speed (emacs is already running, you're just connecting to it and splatting a new buffer to the terminal).
... can it cost more than my contribution?
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
>>>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.
:'a,'b!longrunningcommand
oh, wait, that was not the right thing... C-<longrunningcommand finishes>cOr 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...
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@zck-desktop:~$ vi --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32) 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) $ vi --version
vi: illegal option -- -
Usage: vi [- | -s] [-l] [-L] [-R] [-r [file]] [-t tag]
[-v] [-V] [-w size] [+cmd | -c cmd] file...
$ pacman -Qi vi
Name : vi
Version : 1:070224-2
Description : The original ex/vi text editor
Architecture : x86_64
URL : http://ex-vi.sourceforge.net/
Licenses : custom:ex
Groups : base
Provides : None
Depends On : ncurses
Optional Deps : s-nail: used by the preserve command for notification [installed]
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 290.00 KiB
Packager : Evangelos Foutras <evangelos@foutrelis.com>
Build Date : Sun 06 Sep 2015 03:34:15 PM EDT
Install Date : Fri 18 Sep 2015 10:33:33 PM EDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
(ok, I'm not actually on Arch, but I'm downstream of Arch, and that package is directly from Arch)ZZ definitely still works regardless of nocompat though.