{"id":590,"date":"2007-09-12T10:31:33","date_gmt":"2007-09-12T17:31:33","guid":{"rendered":"http:\/\/www.gubatron.com\/blog\/2007\/09\/12\/emacs-pocket-guide\/"},"modified":"2007-09-12T10:31:33","modified_gmt":"2007-09-12T17:31:33","slug":"emacs-pocket-guide","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/emacs-pocket-guide\/","title":{"rendered":"Emacs Pocket Guide"},"content":{"rendered":"<p>I wrote this a long long time ago when I was learning emacs, then pasted it on linuxmachos.org, but that site is down atm.<br \/>\nSo here&#8217;s for future reference<\/p>\n<pre>\nEMACS POCKET GUIDE\n\nCtrl+g          Cancels anything (useful for n00bs)\n\n== Saving ==\nCtrl+x s        Save buffer (buffer a.k.a filez)\nCtrl+x Ctrl+w   Save As\n\n== Opening and switching buffers ==\nCtrl+x Ctrl+f   Para abrir buffers (archivos)\nCtrl+x k        Close buffer\nCtrl+x b Enter  Switch to previous opened buffer\n\nCtrl+x b Tab\nCtrl+x Ctrl+b   Show list of open buffers\n\n== Looking at several buffers at the same time ==\nCtrl+x 2 Split buffer with horizontal bar\nCtrl+x 3 Split buffer with vertical bar\n(You can subdivide the screen up to like 64 viewports)\n\nCtrl+x 1 unsplits everything, only 1 buffer at the time\n\nCtrl+x o Switch focus to next split buffer\n\n== Select, Copy, Cut, Paste ==\nCtrl+spacebar   Mark the beggining of a text region\nCtrl+w          Wipe (a.k.a Cut)\nAlt +w          Copy\nCtrl+y          Paste\nCtrl+k          Cut from the cursor to the end of the line\nCtrl+u          Cut from the cursor to the beggining of the line\n\nAlso everything that you select with the mouse will be on the clipboard\nand you can paste with middle click (or two button click if you have a 2 button mouse)\n\nAlt+x transient-mark-mode  Makes you see what the selection looks like (highlighting)\n\nCtrl+d Delete in front of cursor (DELETE)\n\n== Moving around (Search, Replace, Moving cursor fast) ==\nCtrl+s texto   Forward Search\nCtrl+r texto   Reverse search\n\nOnce you start the search, press Ctrl+S again, or Ctrl+r to 'keep-on-trucking'\nYou can stop with the arrow keys, or pressing enter.\n\nAlt+x query-replace Search and replace interactively\n                    Press 'y' to replace, 'n' to skip and keep searching\n\nAlt+x replace-string Search and replace everything\n\nAlt+x query-replace-regexp  Interactive Regexp Search and Replace\nAlt+x replace-regexp        Non-Interactive Regexp Search and Replace\n\nAlt+f      Move one word forward\nCtrl+right Move one word forward (won't work on console emacs, X-Emacs only)\nAlt+b      Move one word back\nCtrl+left  Move one word back (won't work on console emacs, X-Emacs only)\n\nCtrl+up   Move one paragraph up (X-Emacs only)\nCtrl+down Move one paragraph down (X-Emacs only)\n\nAlt +v Page up\nCtrl+v Page down\n\nEsc &lt;  Go to the very beggining of the buffer\nEsc &gt;  Go to the very end\n\nAlt+x goto-line  Go to a line number\n\nSince doing goto-line like that is too long, add a shortcut on your .emacs\n==================================================\n(define-key esc-map &quot;g&quot; 'goto-line)\n==================================================\nNow it'll work with Esc-g\n\nCtrl+shift -\nCtrl \/          UNDO\n\n== Sorting ==\nAlt+x sort-lines Sort lines alphabetically\n\n== Indentation y Code Completion ==\nAlt +   Word completion, repeat as necessary (must have typed the word on any of the opened buffers)\nCtrl+Alt +   Audo Indents based on the mode (java, python, php...)\n\n== OTHER COMMANDS ==\nAlt+x font-lock-mode Puts syntax coloring\nAlt+x c-mode  C style coding\nAlt+x java-mode Java style coding\nAlt+x html-mode ...you get it.\nAlt+x python-mode\nAlt+x php-mode\n\nAlt+u Make rest of a word upper case and go to end of word\nAlt+l Make rest of a word lower case and go to end of word\nAlt+c Make current char upper case and go to end of word\n\nEsc =  If you have a text region selected, see statistics about it.\n\nCtrl+x = Shows current position of cursor\n\nComplete reference here\nhttp:\/\/www.utexas.edu\/cc\/docs\/ccrl34.html\n\nby Gubatron\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I wrote this a long long time ago when I was learning emacs, then pasted it on linuxmachos.org, but that site is down atm. So here&#8217;s for future reference EMACS POCKET GUIDE Ctrl+g Cancels anything (useful for n00bs) == Saving == Ctrl+x s Save buffer (buffer a.k.a filez) Ctrl+x Ctrl+w Save As == Opening and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15,30],"tags":[],"class_list":["post-590","post","type-post","status-publish","format-standard","hentry","category-code","category-geeklife"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-9w","jetpack-related-posts":[{"id":75,"url":"https:\/\/www.gubatron.com\/blog\/upgrades-a-wedoit4youcom-emacs-tips\/","url_meta":{"origin":590,"position":0},"title":"Upgrades a wedoit4you.com \/ eMacs Tips","author":"gubatron","date":"December 19, 2004","format":false,"excerpt":"Hemos clasificado todo nuestro contenido de Reviews\/Articulos\/Noticias en Categorias. Las categorias se fueron creando a medida que revisabamos todo nuestro contenido, que ya sobrepasa las 500 publicaciones. Aun esta por pulirse un poco el look de como accedemos a estas categorias, y ahora si conseguimos el tiempo y el habito\u2026","rel":"","context":"In &quot;Gubatron&quot;","block_context":{"text":"Gubatron","link":"https:\/\/www.gubatron.com\/blog\/category\/gubatron\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":167,"url":"https:\/\/www.gubatron.com\/blog\/otros-comandos-de-emacs\/","url_meta":{"origin":590,"position":1},"title":"Otros comandos de eMacs.","author":"gubatron","date":"June 7, 2005","format":false,"excerpt":"Algunos comandillos nuevos que he aprendido, muy utiles. Convertir el resto de una palabra a Minusculas Alt+l Convertir el resto de una palabra a Mayusculas Alt+u Seleccionar toda el documento Ctrl+x Ctrl+p Intercambiar la posicion del cursor (inicio\/final o final\/inicio) una vez que seleccionas una region Ctrl+x Ctrl+x Cuando tienes\u2026","rel":"","context":"In &quot;Gubatron&quot;","block_context":{"text":"Gubatron","link":"https:\/\/www.gubatron.com\/blog\/category\/gubatron\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":176,"url":"https:\/\/www.gubatron.com\/blog\/emacs-php-pon-esto-en-emacs\/","url_meta":{"origin":590,"position":2},"title":"emacs + php ? (pon esto en .emacs)","author":"gubatron","date":"July 12, 2005","format":false,"excerpt":"Si estas trabajando en PHP con emacs, recomiendo que tengas esto al final de tu archivo ~\/.emacs (require 'php-mode) (global-font-lock-mode 1 t) (define-key esc-map \"g\" 'goto-line) Carga el modo php Por defecto tienes fon-lock-mode puesto, asi que vas a tener syntax highlighting apenas abras el archivo. Y para hacer goto-line,\u2026","rel":"","context":"In &quot;Gubatron&quot;","block_context":{"text":"Gubatron","link":"https:\/\/www.gubatron.com\/blog\/category\/gubatron\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":63,"url":"https:\/\/www.gubatron.com\/blog\/vaciando-el-buffer\/","url_meta":{"origin":590,"position":3},"title":"Vaciando el Buffer","author":"gubatron","date":"December 10, 2004","format":false,"excerpt":"Este post es un poco para desahogar algunos consejos y tips que he querido tener anotados, y que mejor lugar que el blog, donde mis notas personales pueden ayudar a otros. En mi \u00faltimas asignaciones profesionales he tenido que trabajar en ambientes 100% Linux, esto me ha hecho refrescar viejas\u2026","rel":"","context":"In &quot;Gubatron&quot;","block_context":{"text":"Gubatron","link":"https:\/\/www.gubatron.com\/blog\/category\/gubatron\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3303,"url":"https:\/\/www.gubatron.com\/blog\/how-to-edit-the-same-wordtoken-in-multiple-places-using-sublime-text\/","url_meta":{"origin":590,"position":4},"title":"How to edit the same word\/token in multiple places using Sublime Text","author":"gubatron","date":"June 27, 2014","format":false,"excerpt":"1. Double click on the word\/variable\/token 2. Press Ctrl+Cmd+G 3. start editing, it will edit all the ocurrences of the same token within the same file. 4. When you are done, you can click anywhere, or press Ctrl+Cmd+G again to finish the simultaneous edits.","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2499,"url":"https:\/\/www.gubatron.com\/blog\/solved-updated-to-ubuntu-11-10-on-virtualbox-and-now-you-get-a-blank-screen-when-you-reboot\/","url_meta":{"origin":590,"position":5},"title":"[SOLVED] Updated to Ubuntu 11.10 on VirtualBox and now you get a blank screen when you reboot?","author":"gubatron","date":"October 20, 2011","format":false,"excerpt":"So you used the update manager to upgrade to the new Ubuntu 11.10 that came out a couple days ago and when you're finished with the process, next time it boots you get a blank screen. Do this: 1. Switch to a terminal. Press \"Ctrl+Alt+F1\" if you're on Windows. or\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.gubatron.com\/blog\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=590"}],"version-history":[{"count":0,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/590\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}