version=pmwiki-2.2.130 ordered=1 urlencoded=1 agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0 author=LohanG charset=UTF-8 csum= ctime=1636191457 host=51.15.9.205 name=Emacs.Emacs rev=3 targets= text=Emacs is a powerful, extensible and customizable text editor. GNU Emacs is probably the most popular variant of Emacs as it is included in the repositories of many popular GNU/Linux distributions. Emacs runs on several operating systems including GNU/Linux, OpenBSD, FreeBSD, NetBSD, MacOS, MS Windows and Solaris. %0a%0a'''Install Emacs on OpenBSD'''%0a%0a[@%0a$ doas pkg_add emacs%0a@]%0a%0aEmacs comes with a comprehensive, built-in help system which can be accessed by pressing C-h t; In other words, pressing Control h, followed by t. This starts an interactive tutorial that you can follow, save and continue at a later time.%0a%0a'''Emacs cheat sheet'''%0a%0aEmacs key bindings are unique, but easy to understand and remember when you become familiar with its terminology. In Emacs C-x means "click on Control and x at the same time". M-x means: "type Alt then x"; M refers to Meta. In most cases the Alt key functions as the Meta key. However on some keyboards there is a real Meta key. '''In this cheat sheet we use the popular naming of the keys as Alt and Control.'''%0a%0a'''Starting emacs'''%0a%0a$ emacs [Enter]%0a to start emacs. %0a$ emacs filename [Enter]%0a to start emacs and load a file %0a$ emacs -nw filename [Enter]%0a to start emacs with no new window (load file) %0a %0a'''Quitting'''%0a%0a[Ctrl]x [Ctrl]c%0a quit emacs (Emacs will prompt if any of the files have not yet been saved.) %0a[Ctrl]g%0a aborts any command in progress %0a %0a%0a'''Help'''%0a%0a[Ctrl]h t%0a to see the tutorial %0a[Ctrl]h a topic [Enter]%0a to see help about topic %0a[Ctrl]x u%0a undo the last command%0a%0a%0a'''Cursor positioning and navigation within a file'''%0a%0a[Ctrl]f or [>-]%0a forward (right) one character. %0a[Ctrl]b or [>-]%0a back (left) one character %0a[Ctrl]p or [^]%0a up one screen line %0a[Ctrl]n or [v]%0a down one screen line %0a[Esc]b%0a left one word %0a[Esc]f%0a right one word %0a %0a[Ctrl]a%0a to beginning of line %0a[Ctrl]e%0a to end of line %0a[Esc]%3c%0a start of document %0a[Esc]>%0a end of document %0a[Esc]v%0a page up %0a[Ctrl]v%0a page down %0a[Ctrl]l%0a cursor in middle of screen %0a[Ctrl]u 20 [Ctrl]n%0a advance 20 lines %0a[Ctrl]x w%0a display the line number where the cursor is located %0a[Esc]x goto-line [Enter] 999 [Enter]%0a go to line number 999%0a%0a%0a'''Search and Replace'''%0a%0a[Ctrl]s dance [Enter]%0a search for dance; cursor moves as you type. Press [Enter] once at the correct location %0a[Ctrl]r dance [Enter]%0a search backwards for dance; cursor moves as you type. %0a[Ctrl]s [Enter] [Enter]%0a search for the next occurrence %0a[Esc]%25 oldstring [Enter] newstring [Enter]%0a Search for oldstring and replace it with newstring. The y key confirms each replacement, n skips it, q to exit %0a%0a %0a'''Regions'''%0a%0a[Ctrl]SPC%0a set mark at cursor %0a[Ctrl]w%0a kill region %0a[Esc]w%0a copy region to kill ring %0a[Ctrl]y%0a yank back last thing killed %0a%0a'''Loading and Saving'''%0a%0a[Ctrl]x [Ctrl]f filename%0a create new filename for editing (clears workspace) %0a[Ctrl]x [Ctrl]f filename%0a load in filename for editing %0a[Ctrl]x [Ctrl]w filename%0a write (save) as filename %0a[Ctrl]x [Ctrl]s%0a resave under the current filename (based on above or name given when starting emacs)%0a%0a%0a'''Cutting and Pasting'''%0a%0a[Ctrl]SPC%0a Mark one end of region%0a[Ctrl]w%0a Cut (after you Mark and move to other end)%0a[Alt]w%0a Copy (after you Mark and move to other end)%0a[Ctrl]y%0a Yank (paste) most recently killed (cut or copied); will also use text currently selected in another application.%0a[Alt]y%0a Next most recently killed (do [Ctrl]y first, repeat [Alt]y to cycle thru all)‍ time=1636216746 author:1636216746=LohanG diff:1636216746:1636191586:=5d4%0a%3c [@%0a7d5%0a%3c @]%0a host:1636216746=51.15.9.205 author:1636191586=LohanG diff:1636191586:1636191457:=6a7,10%0a> '''Emacs key bindings'''%0a> %0a> Emacs key bindings are unique, but easy to understand and remember when you become familiar with its terminology. In Emacs C-x means "click on Control and x at the same time". M-x means: "type Alt then x"; M refers to Meta. In most cases the Alt key functions as the Meta key. However on some keyboards there is a real Meta key. In this cheat sheet we use the popular naming of the keys as Alt and Control.%0a> %0a10,11d13%0a%3c %0a%3c Emacs key bindings are unique, but easy to understand and remember when you become familiar with its terminology. In Emacs C-x means "click on Control and x at the same time". M-x means: "type Alt then x"; M refers to Meta. In most cases the Alt key functions as the Meta key. However on some keyboards there is a real Meta key. '''In this cheat sheet we use the popular naming of the keys as Alt and Control.'''%0a host:1636191586=51.15.9.205 author:1636191457=LohanG diff:1636191457:1636191457:=1,125d0%0a%3c Emacs is a powerful, extensible and customizable text editor. GNU Emacs is probably the most popular variant of Emacs as it is included in the repositories of many popular GNU/Linux distributions. Emacs runs on several operating systems including GNU/Linux, OpenBSD, FreeBSD, NetBSD, MacOS, MS Windows and Solaris. %0a%3c %0a%3c '''Install Emacs on OpenBSD'''%0a%3c %0a%3c $ doas pkg_add emacs%0a%3c %0a%3c '''Emacs key bindings'''%0a%3c %0a%3c Emacs key bindings are unique, but easy to understand and remember when you become familiar with its terminology. In Emacs C-x means "click on Control and x at the same time". M-x means: "type Alt then x"; M refers to Meta. In most cases the Alt key functions as the Meta key. However on some keyboards there is a real Meta key. In this cheat sheet we use the popular naming of the keys as Alt and Control.%0a%3c %0a%3c Emacs comes with a comprehensive, built-in help system which can be accessed by pressing C-h t; In other words, pressing Control h, followed by t. This starts an interactive tutorial that you can follow, save and continue at a later time.%0a%3c %0a%3c '''Emacs cheat sheet'''%0a%3c %0a%3c '''Starting emacs'''%0a%3c %0a%3c $ emacs [Enter]%0a%3c to start emacs. %0a%3c $ emacs filename [Enter]%0a%3c to start emacs and load a file %0a%3c $ emacs -nw filename [Enter]%0a%3c to start emacs with no new window (load file) %0a%3c %0a%3c '''Quitting'''%0a%3c %0a%3c [Ctrl]x [Ctrl]c%0a%3c quit emacs (Emacs will prompt if any of the files have not yet been saved.) %0a%3c [Ctrl]g%0a%3c aborts any command in progress %0a%3c %0a%3c %0a%3c '''Help'''%0a%3c %0a%3c [Ctrl]h t%0a%3c to see the tutorial %0a%3c [Ctrl]h a topic [Enter]%0a%3c to see help about topic %0a%3c [Ctrl]x u%0a%3c undo the last command%0a%3c %0a%3c %0a%3c '''Cursor positioning and navigation within a file'''%0a%3c %0a%3c [Ctrl]f or [>-]%0a%3c forward (right) one character. %0a%3c [Ctrl]b or [>-]%0a%3c back (left) one character %0a%3c [Ctrl]p or [^]%0a%3c up one screen line %0a%3c [Ctrl]n or [v]%0a%3c down one screen line %0a%3c [Esc]b%0a%3c left one word %0a%3c [Esc]f%0a%3c right one word %0a%3c %0a%3c [Ctrl]a%0a%3c to beginning of line %0a%3c [Ctrl]e%0a%3c to end of line %0a%3c [Esc]%3c%0a%3c start of document %0a%3c [Esc]>%0a%3c end of document %0a%3c [Esc]v%0a%3c page up %0a%3c [Ctrl]v%0a%3c page down %0a%3c [Ctrl]l%0a%3c cursor in middle of screen %0a%3c [Ctrl]u 20 [Ctrl]n%0a%3c advance 20 lines %0a%3c [Ctrl]x w%0a%3c display the line number where the cursor is located %0a%3c [Esc]x goto-line [Enter] 999 [Enter]%0a%3c go to line number 999%0a%3c %0a%3c %0a%3c '''Search and Replace'''%0a%3c %0a%3c [Ctrl]s dance [Enter]%0a%3c search for dance; cursor moves as you type. Press [Enter] once at the correct location %0a%3c [Ctrl]r dance [Enter]%0a%3c search backwards for dance; cursor moves as you type. %0a%3c [Ctrl]s [Enter] [Enter]%0a%3c search for the next occurrence %0a%3c [Esc]%25 oldstring [Enter] newstring [Enter]%0a%3c Search for oldstring and replace it with newstring. The y key confirms each replacement, n skips it, q to exit %0a%3c %0a%3c %0a%3c '''Regions'''%0a%3c %0a%3c [Ctrl]SPC%0a%3c set mark at cursor %0a%3c [Ctrl]w%0a%3c kill region %0a%3c [Esc]w%0a%3c copy region to kill ring %0a%3c [Ctrl]y%0a%3c yank back last thing killed %0a%3c %0a%3c '''Loading and Saving'''%0a%3c %0a%3c [Ctrl]x [Ctrl]f filename%0a%3c create new filename for editing (clears workspace) %0a%3c [Ctrl]x [Ctrl]f filename%0a%3c load in filename for editing %0a%3c [Ctrl]x [Ctrl]w filename%0a%3c write (save) as filename %0a%3c [Ctrl]x [Ctrl]s%0a%3c resave under the current filename (based on above or name given when starting emacs)%0a%3c %0a%3c %0a%3c '''Cutting and Pasting'''%0a%3c %0a%3c [Ctrl]SPC%0a%3c Mark one end of region%0a%3c [Ctrl]w%0a%3c Cut (after you Mark and move to other end)%0a%3c [Alt]w%0a%3c Copy (after you Mark and move to other end)%0a%3c [Ctrl]y%0a%3c Yank (paste) most recently killed (cut or copied); will also use text currently selected in another application.%0a%3c [Alt]y%0a%3c Next most recently killed (do [Ctrl]y first, repeat [Alt]y to cycle thru all)‍%0a\ No newline at end of file%0a host:1636191457=51.15.9.205