![]() It was Richard Stallman and a few others that added things like being able to read, edit, and write a file at the same time, and defining macros: keystrokes to run other TECO programs. Meanwhile in the past, MIT’s ITS operating system used a line editor called TECO, for Tape Editor and Corrector, which was similar to Bell Lab’s ed, and just as cryptic in syntax. ![]() In the most recent Stack Overflow development survey, it tied for fourth in most popular development environment, as well as second most popular for devOps and, surprisingly, fifth for web developers. Vim, which here I’ll use more or less interchangeably to trigger the pedantic, is a port of vi that has been included in most distros of Linux since time immemorial (which in computer terms is early- to mid-90s). BSD, thanks to permissive licensing, was the basis for a lot of flavors of Unix, one of which was the basis for macOS, so vi became the default editor for most anyone in a POSIX environment (i.e. Bill Joy, as one of the developers of ex, redesigned ex to include a visual mode, which you started within ex by typing visual, or, if you were in a hurry, vi.īill Joy was also responsible for releasing BSD Unix, with ed and ex as the included text editors. ![]() (Fans of this blog will remember that was the reason for line numbers when coding in BASIC.)Įven for a line editor, ed’s commands were cryptic, so that led to the development of em, the ‘ editor for mortals,’ which led to en, probably because ’n’ comes after ‘m,’ which led to ex, or extended en. ed was a line editor: you could edit one line at a time, but not a whole screen of text line editors like ed were meant to output to teleprinters, not CRT screens. Another instance where it seems like emacs adds overhead to the preciously minimalistic vim keybindings, but having two keys instead of one adds immeasurable navigational flexibility.U NIX was developed starting in 1969 at Bell Labs, and one of the first parts developed was a text editor called ed (as in ‘ editor’). Check the major mode you are in for even more context-sensitive commands (e.g., M-a and M-e to go the beginning or ending of a statement in the C++ major mode). As a bonus, you also get C-M-d (if your window manager hasn’t stolen that keybinding) and C-M-u that go down or up (respectively) in the current structure-i.e., C-M-d will place the cursor inside the parenthetical statement, ready to iterate over the items inside the parentheses with C-M-n, while C-M-u will place the cursor at the beginning of the parenthesis or block structure enclosing the cursor. Since emacs has a major mode related to most languages you could find yourself working in (and if not, it’s not difficult to find or make one) that will do a rudimentary parse of the code into proper tokens, C-M-n and C-M-p can intelligently jump to the beginning or end of parenthetical structures, words, or blocks with equal effectiveness. ![]() In general C-n and C-p will traverse to the next or previous line, respectively, but C-M-n and C-M-p will traverse forward or backward over the current list. (),, , etc.) with vim’s % key is invaluable, but emacs not only replicates this feature, but adds a few new bits of functionality too. Traversing pairs of grouping characters (e.g. ![]()
0 Comments
Leave a Reply. |