tuhdo-emacs使用说明
General use
- C-c-i add what C-x C-f mode’s value
Basic movements
- C-M-f
forward-sexp - C-M-b
backward-sexp - C-M-k
kill-sexpdel the code - C-M-\
Find definitions in project
- M-.
ggtags-find-tag-dwimpush - M-,
tags-loop-continuepop - C-j
helm-gtags-selectfind tag helm-gtags-find-filesfind files in projecthelm-gtags-show-stackview visited tags with tag stack
Browse source tree with Speedbar file browser
speedbarto open a file browser- \
General completion by use company-mode
use clang completion. system’s file OK ,if yourself tell clang about your include path
in project root,make a file named .dir-locals.el and type your include folder in it.if you add something new,like an include path,reopen the file for the values to take effect.
((nil . ((company-clang-arguments . ("-I/home/<user>/project_root/include1/"
"-I/home/<user>/project_root/include2/")))))
CEDT
Semantic
- it will store the parse result in database for future use when
semanticdb-minor-modeis active.And the file will store in directory specified bysemanticdb-default-save-directory - add more include path
(semantic-add-system-include "/usr/include/boost" 'c++-mode)
(semantic-add-system-include "~/linux/kernel")
(semantic-add-system-include "~/linux/include") - to use
company-semanticto complete
Senator
#jump
- C-c,n
senator-next-tagjump to next tag - C-c,p
senator-previous-tagjump to previous tag
#copy/paste
- C-c,M-w
senator-copy-tagcopy the tag,maybe the function - C-c,C-w
senator-kill-tagcut the tag,maybe the function
source code information
global-semantic-idle-summary-modeopen,it will show you the definition of function or variable(function show declaration,variable show definition).Just add(global-semantic-idle-summary-mode 1)in the configure file if you want use it at the beginning.global-semantic-stickyfunc-modeshow the function definition in top when the function more than one screen
Source code documentation
#man
manshow the man dochelm-man-womanshow man too
#Folding
- hide
hs-toggle-hidinghs-hide-blockhs-hide-all - show
hs-show-blockhs-show-all
#Narrowing
- Narrowing: just show the code what you want to look
narrow-to-defunnarrow buffer to current function at pointwidenwiden buffer. undo the narrow
#Code template using yasnippet
- type
forthen TAB if will expands the template
#smartparens automatic
- like {} “” and so on
- you can mark sth then type “. Then the mark thing will all in “
#compile
- use to compile or use
compile
#debugging
gdbmulti-window good.but will freeze the frame when the exec is over.This is cause by OS X.- use
gut-gdb, it runs all good
#Find/Replace
##find
- C-s find-next,when use it can add C-w insert what the cursor tag
- C-r find-previous
- C-g cancel the search and jump to where find start
##replace
- M-% the type words and replace words,then it will ask you yes or no one by one.type q to quit the process.type ! to replace all.
- C-g stop the replace
##show occur
occurlist match line in another window.
##comment
- C-;
comment-dwim-2dwim(do what i mean).comment the code. if more type comment for more
本文档提供了tuhdo-emacs编辑器的基本使用方法,包括一般操作、代码导航、文件浏览、补全功能设置、代码折叠及注释等。介绍了如何通过配置实现更高效的代码编辑体验,并详细说明了多种快捷键的应用场景。
291

被折叠的 条评论
为什么被折叠?



