Difference between revisions of "Template:NewPage"

From WikEmacs
Jump to: navigation, search
(Undo revision 1944 by Aaptel (talk) reverting mistake, sorry)
Line 1: Line 1:
'''c-mode''' is the default [[major mode]] for editing [[C]] source files
+
'''{{{1}}}''' is a wonderful mode which does wonderful things.
({{File|.c}} and {{File|.h}} files). It uses {{ModeLink|cc-mode}}.
+
  
 
<!-----DONT REMOVE ANYTHING FROM THIS TEMPLATE ------------------------------>
 
<!-----DONT REMOVE ANYTHING FROM THIS TEMPLATE ------------------------------>
Line 13: Line 12:
 
= Basic setup =
 
= Basic setup =
  
c-mode is bundled with Emacs by default. No additional setup is required.  
+
Install these third party libraries or read this section before proceeding.
  
 
= Helpful keybindings =
 
= Helpful keybindings =
  
; {{Keys|C-M-a}}
+
; {{Keys|C-x C-c}}
: Go to the beginning of the current function. If you are between 2 functions, go the start of the previous one.
+
: Quit Emacs.
  
; {{Keys|C-M-e}}
+
; {{CommandKeys|C-x C-s|save-buffer}}
: Go to the end of the current function. If you are between 2 functions, go to the end of the next one.  
+
: Save buffer.
  
 
<!------------------------------------------------------------------------->
 
<!------------------------------------------------------------------------->
Line 27: Line 26:
 
<!-- Customization common to all platforms goes here -->
 
<!-- Customization common to all platforms goes here -->
  
== Change default indenting style ==
+
== Customization 1 ==
 
<source lang="lisp">
 
<source lang="lisp">
; set k&r style
+
(message "This stuff will go in your .emacs")
(setq c-set-style "k&r")
+
; indent with 4 spaces
+
(setq c-basic-offset 4)
+
 
</source>
 
</source>
  
Line 67: Line 63:
 
= [[Emacs-23]] =
 
= [[Emacs-23]] =
 
<!-- Customization/Notes specific to Emacs-22 -->
 
<!-- Customization/Notes specific to Emacs-22 -->
 
+
Emacs-23 is not as great as Emacs-24. You will have these problems and you can workaround it this way.
  
 
<!------------------------------------------------------------------------->
 
<!------------------------------------------------------------------------->
Line 73: Line 69:
 
= Recommended Reading =
 
= Recommended Reading =
 
<!-- Only internal links. DO NOT insert EXTERNAL LINKS -->
 
<!-- Only internal links. DO NOT insert EXTERNAL LINKS -->
 +
* [[Internal Link1]]
 +
* [[Internal Link2]]
  
 
<!------------------------------------------------------------------------->
 
<!------------------------------------------------------------------------->
  
 
= Project Pages =
 
= Project Pages =
* [http://cc-mode.sourceforge.net/ cc-mode]
+
* [http://bazaar.canonical.com/en/ Bazaar]
 +
* [http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html Bzr Users Guide]
  
 
<!------------------------------------------------------------------------->
 
<!------------------------------------------------------------------------->
  
 
= Tutorial Pages =
 
= Tutorial Pages =
<!-- ;[http://wiki.bazaar.canonical.com/EmacsTips Emacs as commit message editor]  -->
+
;[http://wiki.bazaar.canonical.com/EmacsTips Emacs as commit message editor]   
<!-- :Tips for setting up Emacs as Bazaar commit editor. -->
+
:Tips for setting up Emacs as Bazaar commit editor.
  
 
<!------------------------------------------------------------------------->
 
<!------------------------------------------------------------------------->
 
<!-- Add categories based on user-level (beginner etc), user-role (programming, emacs contributor etc), platform (windows, linux etc) or work flow (text editing, document authoring etc)  -->
 
<!-- Add categories based on user-level (beginner etc), user-role (programming, emacs contributor etc), platform (windows, linux etc) or work flow (text editing, document authoring etc)  -->
  
[[Category:Programming]]
+
[[Category:TestCategory1]][[Category:TestCategory2]]

Revision as of 07:46, 31 March 2012

{{{1}}} is a wonderful mode which does wonderful things.



Basic setup

Install these third party libraries or read this section before proceeding.

Helpful keybindings

[C-x C-c]
Quit Emacs.
[C-x C-s] (or M-x save-buffer)
Save buffer.

Common Customization

Customization 1

(message "This stuff will go in your .emacs")


GNU/Linux

OS X

Windows

Emacs-24

Emacs-23

Emacs-23 is not as great as Emacs-24. You will have these problems and you can workaround it this way.


Recommended Reading


Project Pages


Tutorial Pages

Emacs as commit message editor
Tips for setting up Emacs as Bazaar commit editor.