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