| 1 | % Reference Card for GNU Emacs |
| 2 | |
| 3 | % Copyright (C) 1987, 1993, 1996-1997, 2002-2004, 2006-2012 |
| 4 | % Free Software Foundation, Inc. |
| 5 | |
| 6 | % Author: Stephen Gildea <gildea@stop.mail-abuse.org> |
| 7 | % Portuguese translation: Rodrigo Real <rreal@ucpel.tche.br> |
| 8 | |
| 9 | % This file is part of GNU Emacs. |
| 10 | |
| 11 | % GNU Emacs is free software: you can redistribute it and/or modify |
| 12 | % it under the terms of the GNU General Public License as published by |
| 13 | % the Free Software Foundation, either version 3 of the License, or |
| 14 | % (at your option) any later version. |
| 15 | |
| 16 | % GNU Emacs is distributed in the hope that it will be useful, |
| 17 | % but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | % GNU General Public License for more details. |
| 20 | |
| 21 | % You should have received a copy of the GNU General Public License |
| 22 | % along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 23 | |
| 24 | |
| 25 | % This file is intended to be processed by plain TeX (TeX82). |
| 26 | % |
| 27 | % The final reference card has six columns, three on each side. |
| 28 | % This file can be used to produce it in any of three ways: |
| 29 | % 1 column per page |
| 30 | % produces six separate pages, each of which needs to be reduced to 80%. |
| 31 | % This gives the best resolution. |
| 32 | % 2 columns per page |
| 33 | % produces three already-reduced pages. |
| 34 | % You will still need to cut and paste. |
| 35 | % 3 columns per page |
| 36 | % produces two pages which must be printed sideways to make a |
| 37 | % ready-to-use 8.5 x 11 inch reference card. |
| 38 | % For this you need a dvi device driver that can print sideways. |
| 39 | % Which mode to use is controlled by setting \columnsperpage. |
| 40 | % |
| 41 | % To compile and print this document: |
| 42 | % tex refcard.tex |
| 43 | % dvips -t landscape refcard.dvi |
| 44 | |
| 45 | % Thanks to Mario Goulart for the opinions. |
| 46 | |
| 47 | |
| 48 | %**start of header |
| 49 | \newcount\columnsperpage |
| 50 | \newcount\letterpaper |
| 51 | |
| 52 | % This file can be printed with 1, 2, or 3 columns per page. |
| 53 | % Specify how many you want here. |
| 54 | \columnsperpage=3 |
| 55 | |
| 56 | % Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful |
| 57 | % only when columnsperpage is 2 or 3. |
| 58 | \letterpaper=0 |
| 59 | |
| 60 | % PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for |
| 61 | % a landscape layout. |
| 62 | \input pdflayout.sty |
| 63 | \pdflayout=(0l) |
| 64 | |
| 65 | \input emacsver.tex |
| 66 | |
| 67 | % Nothing else needs to be changed below this line. |
| 68 | |
| 69 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill |
| 70 | \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. |
| 71 | Permissions on back.}} |
| 72 | |
| 73 | \def\copyrightnotice{ |
| 74 | \vskip 1ex plus 2 fill\begingroup\small |
| 75 | \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.} |
| 76 | \centerline{For GNU Emacs version \versionemacs} |
| 77 | \centerline{Designed by Stephen Gildea} |
| 78 | \centerline{Translated by Rodrigo Real} |
| 79 | |
| 80 | Permission is granted to make and distribute copies of |
| 81 | this card provided the copyright notice and this permission notice |
| 82 | are preserved on all copies. |
| 83 | |
| 84 | For copies of the GNU Emacs manual, see: |
| 85 | |
| 86 | {\tt http://www.gnu.org/software/emacs/\#Manuals} |
| 87 | \endgroup} |
| 88 | |
| 89 | % make \bye not \outer so that the \def\bye in the \else clause below |
| 90 | % can be scanned without complaint. |
| 91 | \def\bye{\par\vfill\supereject\end} |
| 92 | |
| 93 | \newdimen\intercolumnskip %horizontal space between columns |
| 94 | \newbox\columna %boxes to hold columns already built |
| 95 | \newbox\columnb |
| 96 | |
| 97 | \def\ncolumns{\the\columnsperpage} |
| 98 | |
| 99 | \message{[\ncolumns\space |
| 100 | column\if 1\ncolumns\else s\fi\space per page]} |
| 101 | |
| 102 | \def\scaledmag#1{ scaled \magstep #1} |
| 103 | |
| 104 | % This multi-way format was designed by Stephen Gildea October 1986. |
| 105 | % Note that the 1-column format is fontfamily-independent. |
| 106 | \if 1\ncolumns %one-column format uses normal size |
| 107 | \hsize 4in |
| 108 | \vsize 10in |
| 109 | \voffset -.7in |
| 110 | \font\titlefont=\fontname\tenbf \scaledmag3 |
| 111 | \font\headingfont=\fontname\tenbf \scaledmag2 |
| 112 | \font\smallfont=\fontname\sevenrm |
| 113 | \font\smallsy=\fontname\sevensy |
| 114 | |
| 115 | \footline{\hss\folio} |
| 116 | \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} |
| 117 | \else %2 or 3 columns uses prereduced size |
| 118 | \hsize 3.2in |
| 119 | \if 1\the\letterpaper |
| 120 | \vsize 7.95in |
| 121 | \else |
| 122 | \vsize 7.65in |
| 123 | \fi |
| 124 | \hoffset -.75in |
| 125 | \voffset -.745in |
| 126 | \font\titlefont=cmbx10 \scaledmag2 |
| 127 | \font\headingfont=cmbx10 \scaledmag1 |
| 128 | \font\smallfont=cmr6 |
| 129 | \font\smallsy=cmsy6 |
| 130 | \font\eightrm=cmr8 |
| 131 | \font\eightbf=cmbx8 |
| 132 | \font\eightit=cmti8 |
| 133 | \font\eighttt=cmtt8 |
| 134 | \font\eightmi=cmmi8 |
| 135 | \font\eightsy=cmsy8 |
| 136 | \textfont0=\eightrm |
| 137 | \textfont1=\eightmi |
| 138 | \textfont2=\eightsy |
| 139 | \def\rm{\eightrm} |
| 140 | \def\bf{\eightbf} |
| 141 | \def\it{\eightit} |
| 142 | \def\tt{\eighttt} |
| 143 | \if 1\the\letterpaper |
| 144 | \normalbaselineskip=.8\normalbaselineskip |
| 145 | \else |
| 146 | \normalbaselineskip=.7\normalbaselineskip |
| 147 | \fi |
| 148 | \normallineskip=.8\normallineskip |
| 149 | \normallineskiplimit=.8\normallineskiplimit |
| 150 | \normalbaselines\rm %make definitions take effect |
| 151 | |
| 152 | \if 2\ncolumns |
| 153 | \let\maxcolumn=b |
| 154 | \footline{\hss\rm\folio\hss} |
| 155 | \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} |
| 156 | \else \if 3\ncolumns |
| 157 | \let\maxcolumn=c |
| 158 | \nopagenumbers |
| 159 | \else |
| 160 | \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} |
| 161 | \errmessage{Illegal number of columns per page} |
| 162 | \fi\fi |
| 163 | |
| 164 | %% \intercolumnskip=.46in |
| 165 | \intercolumnskip=.65in |
| 166 | \def\abc{a} |
| 167 | \output={% %see The TeXbook page 257 |
| 168 | % This next line is useful when designing the layout. |
| 169 | %\immediate\write16{Column \folio\abc\space starts with \firstmark} |
| 170 | \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} |
| 171 | \else\if a\abc |
| 172 | \global\setbox\columna\columnbox \global\def\abc{b} |
| 173 | %% in case we never use \columnb (two-column mode) |
| 174 | \global\setbox\columnb\hbox to -\intercolumnskip{} |
| 175 | \else |
| 176 | \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} |
| 177 | \def\multicolumnformat{\shipout\vbox{\makeheadline |
| 178 | \hbox{\box\columna\hskip\intercolumnskip |
| 179 | \box\columnb\hskip\intercolumnskip\columnbox} |
| 180 | \makefootline}\advancepageno} |
| 181 | \def\columnbox{\leftline{\pagebody}} |
| 182 | |
| 183 | \def\bye{\par\vfill\supereject |
| 184 | \if a\abc \else\null\vfill\eject\fi |
| 185 | \if a\abc \else\null\vfill\eject\fi |
| 186 | \end} |
| 187 | \fi |
| 188 | |
| 189 | % we won't be using math mode much, so redefine some of the characters |
| 190 | % we might want to talk about |
| 191 | \catcode`\^=12 |
| 192 | \catcode`\_=12 |
| 193 | |
| 194 | \chardef\\=`\\ |
| 195 | \chardef\{=`\{ |
| 196 | \chardef\}=`\} |
| 197 | |
| 198 | \hyphenation{mini-buf-fer} |
| 199 | |
| 200 | \parindent 0pt |
| 201 | \parskip 1ex plus .5ex minus .5ex |
| 202 | |
| 203 | \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} |
| 204 | |
| 205 | % newcolumn - force a new column. Use sparingly, probably only for |
| 206 | % the first column of a page, which should have a title anyway. |
| 207 | \outer\def\newcolumn{\vfill\eject} |
| 208 | |
| 209 | % title - page title. Argument is title text. |
| 210 | \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} |
| 211 | |
| 212 | % section - new major section. Argument is section name. |
| 213 | \outer\def\section#1{\par\filbreak |
| 214 | \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% |
| 215 | \vskip 2ex plus 1ex minus 1.5ex} |
| 216 | |
| 217 | \newdimen\keyindent |
| 218 | |
| 219 | % beginindentedkeys...endindentedkeys - key definitions will be |
| 220 | % indented, but running text, typically used as headings to group |
| 221 | % definitions, will not. |
| 222 | \def\beginindentedkeys{\keyindent=1em} |
| 223 | \def\endindentedkeys{\keyindent=0em} |
| 224 | \endindentedkeys |
| 225 | |
| 226 | % paralign - begin paragraph containing an alignment. |
| 227 | % If an \halign is entered while in vertical mode, a parskip is never |
| 228 | % inserted. Using \paralign instead of \halign solves this problem. |
| 229 | \def\paralign{\vskip\parskip\halign} |
| 230 | |
| 231 | % \<...> - surrounds a variable name in a code example |
| 232 | \def\<#1>{{\it #1\/}} |
| 233 | |
| 234 | % kbd - argument is characters typed literally. Like the Texinfo command. |
| 235 | \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows |
| 236 | |
| 237 | % beginexample...endexample - surrounds literal text, such a code example. |
| 238 | % typeset in a typewriter font with line breaks preserved |
| 239 | \def\beginexample{\par\leavevmode\begingroup |
| 240 | \obeylines\obeyspaces\parskip0pt\tt} |
| 241 | {\obeyspaces\global\let =\ } |
| 242 | \def\endexample{\endgroup} |
| 243 | |
| 244 | % key - definition of a key. |
| 245 | % \key{description of key}{key-name} |
| 246 | % prints the description left-justified, and the key-name in a \kbd |
| 247 | % form near the right margin. |
| 248 | \def\key#1#2{\leavevmode\hbox to \hsize{\vtop |
| 249 | {\hsize=.75\hsize\rightskip=1em |
| 250 | \hskip\keyindent\relax#1}\kbd{#2}\hfil}} |
| 251 | |
| 252 | \newbox\metaxbox |
| 253 | \setbox\metaxbox\hbox{\kbd{M-x }} |
| 254 | \newdimen\metaxwidth |
| 255 | \metaxwidth=\wd\metaxbox |
| 256 | |
| 257 | % metax - definition of a M-x command. |
| 258 | % \metax{description of command}{M-x command-name} |
| 259 | % Tries to justify the beginning of the command name at the same place |
| 260 | % as \key starts the key name. (The "M-x " sticks out to the left.) |
| 261 | \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize |
| 262 | {\hskip\keyindent\relax#1\hfil}% |
| 263 | \hskip -\metaxwidth minus 1fil |
| 264 | \kbd{#2}\hfil}} |
| 265 | |
| 266 | % threecol - like "key" but with two key names. |
| 267 | % for example, one for doing the action backward, and one for forward. |
| 268 | \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad |
| 269 | &\kbd{#3}\hfil\quad\cr} |
| 270 | |
| 271 | |
| 272 | %**end of header |
| 273 | \f |
| 274 | |
| 275 | \title{GNU Emacs: Cart\~ao de Refer\^encia} |
| 276 | \centerline{(para vers\~ao \versionemacs)} |
| 277 | |
| 278 | \section{Iniciando o Emacs} |
| 279 | |
| 280 | Para entrar no GNU Emacs, digite: \kbd{emacs} |
| 281 | |
| 282 | \section{Saindo do Emacs} |
| 283 | |
| 284 | \key{suspende ou minimiza o Emacs}{C-z} |
| 285 | \key{encerra o Emacs}{C-x C-c} |
| 286 | |
| 287 | \section{Arquivos} |
| 288 | |
| 289 | \key{{\bf abre} um arquivo}{C-x C-f} |
| 290 | \key{{\bf salva} um arquivo em disco}{C-x C-s} |
| 291 | \key{salva {\bf todos} arquivos abertos}{C-x s} |
| 292 | \key{{\bf insere} outro arquivo neste buffer}{C-x i} |
| 293 | \key{substitui este arquivo por outro}{C-x C-v} |
| 294 | \key{salva o buffer em um arquivo especificado}{C-x C-w} |
| 295 | \key{alterna o estado de somente leitura do buffer}{C-x C-q} |
| 296 | |
| 297 | \section{Ajuda (Help)} |
| 298 | |
| 299 | Tecle \kbd{C-h} (ou \kbd{F1}) e siga as instru{\c{c}}{\~o}es. |
| 300 | |
| 301 | \key{remove a janela de ajuda}{C-x 1} |
| 302 | \key{rola a janela de ajuda}{C-M-v} |
| 303 | |
| 304 | \key{apropos: mostra comandos que casam com a string}{C-h a} |
| 305 | \key{descreve fun{\c{c}}{\~a}o associada a teclas}{C-h k} |
| 306 | \key{descreve uma fun{\c{c}}{\~a}o}{C-h f} |
| 307 | \key{busca informa{\c{c}}{\~o}es espec{\'\i}ficas do modo}{C-h m} |
| 308 | |
| 309 | \section{Recuperando-se de Erros} |
| 310 | |
| 311 | \key{{\bf aborta} uma opera{\c{c}}{\~a}o}{C-g} |
| 312 | \metax{{\bf recupera} arquivos ap{\'o}s crash}{M-x recover-session} |
| 313 | \metax{desfaz uma altera{\c{c}}{\~a}o ({\bf undo})}{C-x u, C-_ {\rm or} C-/} |
| 314 | \metax{restaura um buffer para o arquivo}{M-x revert-buffer} |
| 315 | \key{redesenha a tela}{C-l} |
| 316 | |
| 317 | \section{Busca Incremental} |
| 318 | |
| 319 | \key{busca para frente}{C-s} |
| 320 | \key{busca para tr{\'a}s}{C-r} |
| 321 | \key{busca por express{\~a}o regular}{C-M-s} |
| 322 | \key{busca por express{\~a}o regular para tr{\'a}s}{C-M-r} |
| 323 | |
| 324 | \key{seleciona a string de pesquisa anterior}{M-p} |
| 325 | \key{seleciona a string seguinte de pesquisa}{M-n} |
| 326 | \key{sai da busca incremental}{RET} |
| 327 | \key{desfaz o efeito do {\'u}ltimo caracter}{DEL} |
| 328 | \key{encerra a busca}{C-g} |
| 329 | |
| 330 | Use \kbd{C-s} ou \kbd{C-r} novamente para repetir a busca. |
| 331 | \kbd{C-g} cancela apenas o que ainda n{\~a}o foi feito. |
| 332 | |
| 333 | \shortcopyrightnotice |
| 334 | |
| 335 | \section{Movimenta{\c{c}}{\~a}o} |
| 336 | |
| 337 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr |
| 338 | \threecol{{\bf avan{\c{c}}ar}}{{\bf tr{\'a}s}}{{\bf frente}} |
| 339 | \threecol{um caracter}{C-b}{C-f} |
| 340 | \threecol{uma palavra}{M-b}{M-f} |
| 341 | \threecol{uma linha}{C-p}{C-n} |
| 342 | \threecol{para in{\'\i}cio ou fim de linha}{C-a}{C-e} |
| 343 | \threecol{senten{\c{c}}a}{M-a}{M-e} |
| 344 | \threecol{par{\'a}grafo}{M-\{}{M-\}} |
| 345 | \threecol{p{\'a}gina}{C-x [}{C-x ]} |
| 346 | \threecol{sexp}{C-M-b}{C-M-f} |
| 347 | \threecol{fun{\c{c}}{\~a}o}{C-M-a}{C-M-e} |
| 348 | \threecol{para in{\'\i}cio ou fim do buffer}{M-<}{M->} |
| 349 | } |
| 350 | |
| 351 | \key{rolar para pr{\'o}xima tela}{C-v} |
| 352 | \key{rolar para tela anterior}{M-v} |
| 353 | \key{rolar para esquerda}{C-x <} |
| 354 | \key{rolar para direita}{C-x >} |
| 355 | \key{rolar a linha corrente para o centro da tela}{C-u C-l} |
| 356 | |
| 357 | \section{Cortando e Apagando} |
| 358 | |
| 359 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr |
| 360 | \threecol{{\bf entidade a cortar}}{{\bf tr{\'a}s}}{{\bf frente}} |
| 361 | \threecol{caracter (apaga, n{\~a}o corta)}{DEL}{C-d} |
| 362 | \threecol{palavra}{M-DEL}{M-d} |
| 363 | \threecol{linha (at{\'e} o final)}{M-0 C-k}{C-k} |
| 364 | \threecol{senten{\c{c}}a}{C-x DEL}{M-k} |
| 365 | \threecol{sexp}{M-- C-M-k}{C-M-k} |
| 366 | } |
| 367 | |
| 368 | \key{corta {\bf regi{\~a}o}}{C-w} |
| 369 | \key{copia a {\bf regi{\~a}o}}{M-w} |
| 370 | \key{cortar at{\'e} a pr{\'o}xima ocorr{\^e}ncia de {\it char}}{M-z {\it char}} |
| 371 | |
| 372 | \key{colar a {\'u}ltima coisa cortada}{C-y} |
| 373 | \key{substitui a {\'u}lt. colagem pela c{\'o}pia anterior}{M-y} |
| 374 | |
| 375 | \section{Marcando} |
| 376 | |
| 377 | \key{posiciona a marca aqui}{C-@ {\rm or} C-SPC} |
| 378 | \key{troca a marca pelo ponto e vice-versa}{C-x C-x} |
| 379 | |
| 380 | \key{coloca a marca {\it arg\/} {\bf palavras} adiante}{M-@} |
| 381 | \key{marca o {\bf par{\'a}grafo}}{M-h} |
| 382 | \key{marca a {\bf p{\'a}gina}}{C-x C-p} |
| 383 | \key{marca a {\bf sexp}}{C-M-@} |
| 384 | \key{marca uma {\bf fun{\c{c}}{\~a}o}}{C-M-h} |
| 385 | \key{marca todo {\bf buffer}}{C-x h} |
| 386 | |
| 387 | \section{Busca e Substitui{\c{c}}{\~a}o} |
| 388 | |
| 389 | \key{Substitui interativamente uma string}{M-\%} |
| 390 | % query-replace-regexp is bound to C-M-% but that can't be typed on |
| 391 | % consoles. |
| 392 | \metax{usando express{\~a}o regular}{M-x query-replace-regexp} |
| 393 | |
| 394 | Respostas v{\'a}lidas no modo de busca e substitui{\c{c}}{\~a}o |
| 395 | |
| 396 | \key{{\bf substitui} esta, e prossegue}{SPC} |
| 397 | \key{substitui esta e entrada e n{\~a}o avan{\c{c}}a}{,} |
| 398 | \key{{\bf pula} para a pr{\'o}xima sem substituir}{DEL} |
| 399 | \key{substitui em todo o texto restante}{!} |
| 400 | \key{{\bf volta} para a palavra anterior}{^} |
| 401 | \key{{\bf encerra}}{RET} |
| 402 | \key{entra na edi{\c{c}}{\~a}o recursiva (\kbd{C-M-c} para sair)}{C-r} |
| 403 | |
| 404 | |
| 405 | \section{M{\'u}ltiplas Janelas} |
| 406 | |
| 407 | Quando forem mostrados 2 comandos, o segundo tem comportamento similar |
| 408 | para frame. |
| 409 | |
| 410 | {\setbox0=\hbox{\kbd{0}}\advance\hsize by 0\wd0 |
| 411 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr |
| 412 | \threecol{elimina todas outras janelas}{C-x 1\ \ \ \ }{C-x 5 1} |
| 413 | \threecol{divide a janela, acima e abaixo}{C-x 2\ \ \ \ }{C-x 5 2} |
| 414 | \threecol{elimina esta janela}{C-x 0\ \ \ \ }{C-x 5 0} |
| 415 | }} |
| 416 | \key{divide a janela, lado a lado}{C-x 3} |
| 417 | |
| 418 | \key{rola a outra janela}{C-M-v} |
| 419 | |
| 420 | {\setbox0=\hbox{\kbd{0}}\advance\hsize by 2\wd0 |
| 421 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr |
| 422 | \threecol{leva o cursor para outra janela}{C-x o}{C-x 5 o} |
| 423 | |
| 424 | \threecol{seleciona um buffer em outra janela}{C-x 4 b}{C-x 5 b} |
| 425 | \threecol{mostra um buffer em outra janela}{C-x 4 C-o}{C-x 5 C-o} |
| 426 | \threecol{busca um arquivo em outra janela}{C-x 4 f}{C-x 5 f} |
| 427 | \threecol{busca arquivo (ro) em outra janela}{C-x 4 r}{C-x 5 r} |
| 428 | \threecol{executa Dired em outra janela}{C-x 4 d}{C-x 5 d} |
| 429 | \threecol{busca tag em outra janela}{C-x 4 .}{C-x 5 .} |
| 430 | }} |
| 431 | |
| 432 | \key{aumenta a janela na vertical}{C-x ^} |
| 433 | \key{estreita a janela}{C-x \{} |
| 434 | \key{alarga a janela}{C-x \}} |
| 435 | |
| 436 | \section{Formatando} |
| 437 | |
| 438 | \key{identa a {\bf linha} corrente (modo)}{TAB} |
| 439 | \key{identa a {\bf regi{\~a}o} (modo)}{C-M-\\} |
| 440 | \key{identa a {\bf sexp} (modo)}{C-M-q} |
| 441 | \key{identa regi{\~a}o rigidamente {\it arg\/} colunas}{C-x TAB} |
| 442 | |
| 443 | \key{insere uma nova linha ap{\'o}s o ponto}{C-o} |
| 444 | \key{move o restante da linha para baixo}{C-M-o} |
| 445 | \key{apaga linhas em branco em torno do ponto}{C-x C-o} |
| 446 | \key{junta a linha com a anterior}{M-^} |
| 447 | \key{apaga todos brancos em torno do ponto}{M-\\} |
| 448 | \key{insere um espa{\c{c}}o em branco}{M-SPC} |
| 449 | |
| 450 | \key{preenche o par{\'a}grafo}{M-q} |
| 451 | \key{define a coluna limite de preenchimento}{C-x f} |
| 452 | \key{define um prefixo para cada linha}{C-x .} |
| 453 | |
| 454 | \key{formata fonte}{M-o} |
| 455 | |
| 456 | \section{Mai{\'u}sculas e Min{\'u}sculas} |
| 457 | |
| 458 | \key{Palavra para mai{\'u}sculas}{M-u} |
| 459 | \key{Palavra para min{\'u}sculas}{M-l} |
| 460 | \key{Primeira letra mai{\'u}scula (capitalize)}{M-c} |
| 461 | |
| 462 | \key{Regi{\~a}o para mai{\'u}sculas}{C-x C-u} |
| 463 | \key{Regi{\~a}o para min{\'u}sculas}{C-x C-l} |
| 464 | |
| 465 | \section{O Minibuffer} |
| 466 | |
| 467 | As teclas seguintes s{\~a}o definidas no minibuffer. |
| 468 | |
| 469 | \key{complete o m{\'a}ximo possi{\'\i}vel}{TAB} |
| 470 | \key{complete at{\'e} uma palavra}{SPC} |
| 471 | \key{complete e execute}{RET} |
| 472 | \key{mostre as op{\c{c}}{\~o}es para completar}{?} |
| 473 | \key{busca a entrada anterior no minibuffer}{M-p} |
| 474 | \key{busca a pr{\'o}xima entrada no minibuffer ou o default}{M-n} |
| 475 | \key{busca regexp no hist{\'o}rico para tr{\'a}s}{M-r} |
| 476 | \key{busca regexp no hist{\'o}rico para frente}{M-s} |
| 477 | \key{encerra o comando}{C-g} |
| 478 | |
| 479 | Tecle \kbd{C-x ESC ESC} para editar e repetir o {\'u}ltimo comando |
| 480 | utilizado. Tecle \kbd{F10} para ativar o menu. |
| 481 | |
| 482 | \newcolumn |
| 483 | \title{GNU Emacs: Cart\~ao de Refer\^encia} |
| 484 | \centerline{(para vers\~ao \versionemacs)} |
| 485 | |
| 486 | \section{Buffers} |
| 487 | |
| 488 | \key{seleciona outro buffer}{C-x b} |
| 489 | \key{lista todos buffers}{C-x C-b} |
| 490 | \key{mata um buffer}{C-x k} |
| 491 | |
| 492 | \section{Transposi{\c{c}}{\~a}o} |
| 493 | |
| 494 | \key{transp{\~o}e {\bf caracteres}}{C-t} |
| 495 | \key{transp{\~o}e {\bf palavras}}{M-t} |
| 496 | \key{transp{\~o}e {\bf linhas}}{C-x C-t} |
| 497 | \key{transp{\~o}e {\bf sexps}}{C-M-t} |
| 498 | |
| 499 | \section{Verifica{\c{c}}{\~a}o Ortogr{\'a}fica} |
| 500 | |
| 501 | \key{verifica a palavra corrente}{M-\$} |
| 502 | \metax{verifica todas palavras de uma regi{\~a}o}{M-x ispell-region} |
| 503 | \metax{verifica todo o buffer}{M-x ispell-buffer} |
| 504 | |
| 505 | \section{Tags} |
| 506 | |
| 507 | \key{busca uma tag (uma defini{\c{c}}{\~a}o)}{M-.} |
| 508 | \key{encontra a pr{\'o}xima ocorr{\^e}ncia da tag}{C-u M-.} |
| 509 | \metax{especifica um novo arquivo de tags}{M-x visit-tags-table} |
| 510 | |
| 511 | \metax{busca por regexp em todos arquivos}{M-x tags-search} |
| 512 | \metax{busca e subst. em todos arquivos}{M-x tags-query-replace} |
| 513 | \key{continua a {\'u}ltima busca ou busca e substitui{\c{c}}{\~a}o}{M-,} |
| 514 | |
| 515 | \section{Shells} |
| 516 | |
| 517 | \key{executa um comando do shell}{M-!} |
| 518 | \key{executa um comando do shell na regi{\~a}o}{M-|} |
| 519 | \key{filtra uma regi{\~a}o por um comando do shell}{C-u M-|} |
| 520 | \key{inicia um shell na janela \kbd{*shell*}}{M-x shell} |
| 521 | |
| 522 | \section{Ret{\^a}ngulos} |
| 523 | |
| 524 | \key{copia o ret{\^a}ngulo para o registrador}{C-x r r} |
| 525 | \key{corta o ret{\^a}ngulo}{C-x r k} |
| 526 | \key{cola o ret{\^a}ngulo}{C-x r y} |
| 527 | \key{abre o ret{\^a}ngulo, move o texto para direita}{C-x r o} |
| 528 | \key{troca por espa{\c{c}}os o conte{\'u}do do ret{\^a}ngulo}{C-x r c} |
| 529 | \key{antep{\~o}e uma linha a string}{C-x r t} |
| 530 | |
| 531 | \section{Abreviaturas} |
| 532 | |
| 533 | \key{adiciona uma abreviatura global}{C-x a g} |
| 534 | \key{adiciona abreviatura ao modo local}{C-x a l} |
| 535 | \key{adiciona globalmente expans{\~a}o de abrev.}{C-x a i g} |
| 536 | \key{adiciona localmente expans{\~a}o de abrev.}{C-x a i l} |
| 537 | \key{explicitamente expande uma abrev}{C-x a e} |
| 538 | |
| 539 | \key{completa com base em palavras anteriores}{M-/} |
| 540 | |
| 541 | |
| 542 | \section{Express{\~o}es Regulares} |
| 543 | |
| 544 | \key{qualquer caracter exceto nova linha}{. {\rm(dot)}} |
| 545 | \key{zero ou mais repeti{\c{c}}{\~o}es}{*} |
| 546 | \key{uma ou mais repeti{\c{c}}{\~o}es}{+} |
| 547 | \key{zero ou uma repeti{\c{c}}{\~a}o}{?} |
| 548 | \key{protege o caracter especial {\it c\/}}{\\{\it c}} |
| 549 | \key{(``or'')}{\\|} |
| 550 | \key{agrupamento}{\\( {\rm$\ldots$} \\)} |
| 551 | \key{mesmo texto que {\it n\/}-{\'e}simo grupo}{\\{\it n}} |
| 552 | \key{quebra de palavra}{\\b} |
| 553 | \key{sem quebra de palavra}{\\B} |
| 554 | |
| 555 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr |
| 556 | \threecol{{\bf entidade}}{{\bf casa in{\'\i}cio}}{{\bf casa fim}} |
| 557 | \threecol{linha}{^}{\$} |
| 558 | \threecol{palavra}{\\<}{\\>} |
| 559 | \threecol{buffer}{\\`}{\\'} |
| 560 | |
| 561 | \threecol{{\bf classe de caracteres}}{{\bf casa esses}}{{\bf casa os outros}} |
| 562 | \threecol{conjunto expl{\'\i}cito}{[ {\rm$\ldots$} ]}{[^ {\rm$\ldots$} ]} |
| 563 | \threecol{caracter de sintaxe de palavra}{\\w}{\\W} |
| 564 | \threecol{caracter de sintaxe de {\it c}}{\\s{\it c}}{\\S{\it c}} |
| 565 | } |
| 566 | |
| 567 | \section{Conjuntos de Carac. Internacionais} |
| 568 | |
| 569 | \key{especifica uma l{\'\i}ngua principal}{C-x RET l} |
| 570 | \metax{mostra todos m{\'e}todos de inser{\c{c}}{\~a}o}{M-x list-input-methods} |
| 571 | \key{habilita/desabilita um m{\'e}todo de inser{\c{c}}{\~a}o}{C-\\} |
| 572 | \key{determina o sistema de codifica{\c{c}}{\~a}o}{C-x RET c} |
| 573 | \metax{mostra sistemas de codifica{\c{c}}{\~a}o}{M-x list-coding-systems} |
| 574 | \metax{escolhe a codifica{\c{c}}{\~a}o preferida}{M-x prefer-coding-system} |
| 575 | |
| 576 | \section{Info} |
| 577 | |
| 578 | \key{entra no leitor de Info}{C-h i} |
| 579 | \key{busca fun{\c{c}}{\~a}o ou arquivo no Info}{C-h S} |
| 580 | \beginindentedkeys |
| 581 | |
| 582 | Movimenta{\c{c}}{\~a}o em um nodo: |
| 583 | |
| 584 | \key{rola para frente}{SPC} |
| 585 | \key{rola para tr{\'a}s}{DEL} |
| 586 | \key{in{\'\i}cio do nodo}{. {\rm (dot)}} |
| 587 | |
| 588 | Movimenta{\c{c}}{\~a}o entre nodos: |
| 589 | |
| 590 | \key{{\bf pr{\'o}ximo} nodo}{n} |
| 591 | \key{nodo {\bf anterior}}{p} |
| 592 | \key{mover cima {\bf cima}}{u} |
| 593 | \key{seleciona item do menu pelo nome}{m} |
| 594 | \key{seleciona {\it n\/}-{\'e}simo item do menu}{{\it n}} |
| 595 | \key{segue refer{\^e}ncia cruzada (retorna com \kbd{l})}{f} |
| 596 | \key{retorna {\'u}ltimo nodo visitado}{l} |
| 597 | \key{retorna ao diret{\'o}rio de nodos}{d} |
| 598 | \key{ir para o topo do arquivo Info}{t} |
| 599 | \key{ir para qualquer nodo por nome}{g} |
| 600 | |
| 601 | Outros: |
| 602 | |
| 603 | \key{executar {\bf tutorial} do Info}{h} |
| 604 | \key{busca pelo assunto no {\'\i}ndice}{i} |
| 605 | \key{busca por express{\~a}o regular}{s} |
| 606 | \key{{\bf sair} Info}{q} |
| 607 | |
| 608 | \endindentedkeys |
| 609 | |
| 610 | \section{Registrador} |
| 611 | |
| 612 | \key{salva regi{\~a}o em um registrador}{C-x r s} |
| 613 | \key{insere o conte{\'u}do do registrador no buffer}{C-x r i} |
| 614 | |
| 615 | \key{salva valor do ponto no registrador}{C-x r SPC} |
| 616 | \key{salta para o ponto salvo no registrador}{C-x r j} |
| 617 | |
| 618 | \section{Macros de Teclado} |
| 619 | |
| 620 | \key{{\bf inicia} a defini{\c{c}}{\~a}o de uma macro}{C-x (} |
| 621 | \key{{\bf encerra} a defini{\c{c}}{\~a}o de uma macro}{C-x )} |
| 622 | \key{{\bf executa} a {\'u}ltima macro definida}{C-x e} |
| 623 | \key{adiciona a {\'u}ltima macro definida}{C-u C-x (} |
| 624 | \metax{nomeia a {\'u}ltima macro definida}{M-x name-last-kbd-macro} |
| 625 | \metax{insere uma defini{\c{c}}{\~a}o em Lisp}{M-x insert-kbd-macro} |
| 626 | |
| 627 | \section{Lidando com Emacs Lisp} |
| 628 | |
| 629 | \key{avalia {\bf sexp} antes do ponto}{C-x C-e} |
| 630 | \key{avalia a {\bf defun} corrente}{C-M-x} |
| 631 | \metax{avalia a {\bf regi{\~a}o}}{M-x eval-region} |
| 632 | \key{l{\^e} e avalia o minibuffer}{M-:} |
| 633 | \metax{carrega do diret{\'o}rio padr{\~a}o do sistema}{M-x load-library} |
| 634 | |
| 635 | \section{Personaliza{\c{c}}{\~a}o Simples} |
| 636 | |
| 637 | \metax{personaliza vari{\'a}veis e fontes}{M-x customize} |
| 638 | |
| 639 | % The intended audience here is the person who wants to make simple |
| 640 | % customizations and knows Lisp syntax. |
| 641 | |
| 642 | Fazendo teclas de atalho globais em Emacs Lisp (exemplos): |
| 643 | |
| 644 | \beginexample% |
| 645 | (global-set-key "\\C-cg" 'goto-line) |
| 646 | (global-set-key "\\M-\#" 'query-replace-regexp) |
| 647 | \endexample |
| 648 | |
| 649 | \section{Escrevendo Comandos} |
| 650 | |
| 651 | \beginexample% |
| 652 | (defun \<command-name> (\<args>) |
| 653 | "\<documentation>" (interactive "\<template>") |
| 654 | \<body>) |
| 655 | \endexample |
| 656 | |
| 657 | Um exemplo: |
| 658 | |
| 659 | \beginexample% |
| 660 | (defun this-line-to-top-of-window (line) |
| 661 | "Reposition line point is on to top of window. |
| 662 | With ARG, put point on line ARG." |
| 663 | (interactive "P") |
| 664 | (recenter (if (null line) |
| 665 | 0 |
| 666 | (prefix-numeric-value line)))) |
| 667 | \endexample |
| 668 | |
| 669 | A especifica{\c{c}}{\~a}o \kbd{interactive} explica como ler |
| 670 | interativamente argumentos. Tecle \kbd{C-h f interactive} para mais |
| 671 | detalhes. |
| 672 | |
| 673 | \copyrightnotice |
| 674 | |
| 675 | \bye |
| 676 | \f |
| 677 | % Local variables: |
| 678 | % compile-command: "pdftex pt-br-refcard" |
| 679 | % coding: iso-latin-1 |
| 680 | % End: |
| 681 | |