Use Emacs C-Mode

Source: Internet
Author: User

M-x C-beginning-of-defun
M-x C-end-of-defun
Adjust the cursor to the function header or tail

C-c-u

C-c-P

C-c-n

M-
The inmost c Declaration, can add the prefix N, adjusted to the N-1 statement

M-e
The last C declaration or statement. In the opposite direction of m-.

C-c-l
C-toggle-electric-State can have prefix Parameters

C-c-
C-toggle-auto-newline prefix

Hungry delete:
C-c-<del>
C-c <del>
C-hungry-delete-backwards

C-c-d
C-c-<Delete>
C-c <Delete>
C-hungry-delete-forward

C-toggle-hungry-State enable Deletion

C-c-W
M-x C-subword-Mode
The subword mode is the case-sensitive crossover mode.

M-x C-context-line-break
New Line and indent. The normal encoding is: C-J (newline-and-indent), preprocessing and annotation is m-J (c-intent-New-comment-line ), you need to configure the binding here. Binding method:
(Defun my-bind-CLB ()
(Define-key C-mode-base-map "\ c-J" 'C-context-line-break ))
(Add-hook 'C-initialization-hook 'My-bind-CLB)

C-m-H
Mark the end of the function and place the cursor in the function header.

M-Q
Fill in the parameter. C-fill-paragraph when processing C/C ++ annotations

C-c-e
Run C preprocessing to display the results, including c-macro-expand.

C-c -\
C-backslash-region

M-x CPP-Highlight-Buffer
Highlight part of text based on preprocessing Conditions

C-c-S
Show synchronization information, C-show-syntactic-infomation. The information here shows how the row is indented.

M-x cwarn-Mode
M-x global-cwarn-Mode
Suspicious displayCode

M-x hide-ifdef-Mode
Hide the selected code, which is located in the # If or # ifdef block of the pre-processing code. If you use hide-ifdef-shadow to hide the code as t, the code will be raised.

M-x FF-find-related-File
Search for related files, such as header files. The FF-related-file-alist variable specifies how to find related files.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.