钱纸的英文译语怎么说-韩国人气组合
2023年4月4日发(作者:affection什么意思)
用Vim进行C/C++编程介绍
来源: ChinaUnix博客 日期: 2007.07.08 22:23 (共有0条评论) 我要评论
作者:Kmj
[小赵] 翻译整理
Vi has been one of the most, if not the most, popular editing tools for programmers
since Bill Joy first created it.
自从Bill Joy最初写出Vi编辑器以来, Vi就一直是编程者中最广为流传的文本编辑
工具, 即使不是最流行的, 也一定是最流行者之一.
Over the years it has evolved, and the current version of vim has many capabilities
which make a programmer\'s life easy. Listed below is a brief description
of some tools which have made so many programmers loyal to vi and vim. The
purpose of this document is to inform linux newbies of, and introduce them
to these tools, not necessarily to be the definitive source of information
on them. In most cases, interested readers should check the noted \"extra
information\" sources.
Vi产生以来, 历经不断革新, 现在最新版的Vim已经具有了非常多的功能, 这些功
能使程序员能更加轻松, 便捷地使用它们. 下面是它的一些功能描述, 正是这些
丰富强大的功能使vi和vim成为无数程序员的至爱. 本文志在向linux的初学者们
介绍这些功能, 而不是追溯其历史渊源. 对此感兴趣的读者可以
查看\"extra information\"获得这些信息.
(Note that throughout this paper, I may use the name vi when referring to
vim. Some options may only be compatible with vim, and not vi.)
(注: 本文中使用vi兼指vim, 但有一些选项可能只有vim支持)
Ctags
Ctags is a program that comes with vim. Basically, it\'s purpose is to help
a programmer get to various parts of his program with relative ease. The
typical method of running ctags is by simply typing the following in your
source directory:
Ctags是vim的伴生工具, 它的基本功能是让程序员能自由穿梭于程序的不同部分(
如从一个函数名跳转到该函数的定义处), 最通常的用法是象下面这样以源程序目
录下所有文件作为参数.
[/home/someuser/src]$ ctags *
This will create a \'tags\' file in you current directory with the following
information for all C or C++ files in you directory. This file contains
a listing of the following objects:
该命令会在当前目录下创建一个名为`tags\'的文件, 该文件包含了你当前目录下
所有的C/C++文件中的相关信息, 具体来说包含以下对象的信息:
macros defined by #define
enumerated values
function definitions, prototypes, and declarations
class,疏影横斜什么意思 enum,中秋节的现代诗歌 struct, and union names
namespaces
typedefs
variables (definitions and declarations)
class, struct, and union members
由#define定义的宏
枚举值
函数定义, 原型和声明.
类, 枚举类型名, 结构名和联合结构名
名字空间
类型定义
变量(定义和声明)
类,结构和联合结构的成员
Vim then uses this f晒字组词 ile to help you locate these tagged items. This can be
Vi Helpfil余光中的诗歌主题有哪些 e, linked below
.
逗号用于分隔任何上面指定的单个行, 以形成一个范围(当然, 这个范围的下界不
能小历史故事大全100篇 于上界, 如10,1为非法的范围, 此时vim会给出一个警告信息, 问你是否进行
反向操作, 如回答y, 则等价于1,10, 操作仍正常进行, 否则, 撤消当前操作,
译者注), 其后指定的操作将作用于此处给出的范围, vim帮助里有关于替换操作
的充分信息.
Miscellany
Vim has so many nifty little things, it would be impossible to list them
all. Here are a few more things that are worth taking a look at.
其它杂项
Vim有众多诱六间房直播大厅 人的小功能, 这里不可能一有关清明的古诗 一列出, 下面列出一些尤其值得注意的一
些特性.
Include File Searching- \':h include-search\'
包含文件搜索- `:h include-search\'
Bookmarking- \'mx\' to set, \' \'x\' to return; (x can be any letter, mus唐宋八大家是哪八位口诀 t stay
within file to remember)
书签设置- \'mx\'用于设置书签, \'\'x\'用于从书签返回;(其中的x可以为任何字母,
但, 只能记录当前文件里的书签) (退出vim后再次进入将不会保留这些书签,
书签就是代表在文件中某一特定位置的一种标记, 译者注)
\"Clipboard\" buffers- \' \"xY \' to cut or copy to buffer x (Y represents
any normal 与清明节有关的诗词 deletion or yank command), \' \"xZ \' to paste contents of x (Z
p or P); (x can be any letter, can switch to another
file(:e filename) and still maintain contents of buffers).
\"剪贴板\" 缓冲- \' \"xY \' 用于剪切或复制到一个名为x的缓冲区(Y 代表任何的
删除或取样命令), \' \"xZ \' 用于粘贴内容(Z代表粘贴命令p 或 P); (其中x可以为
任何字母, 也可在跳转到另一文件中时继续生效(:e filename).
Comment Specifiers- \':h comments\'
注释符- `:h comments\'
.vimrc- Don\'t forget your .vimrc!!! (Located in your home directory). You
\'ll find it very handy to add many of the above things to your .vimrc file
, so that vim \"remembers\" everything you want it to. (You may find that some
of them are already there.) Remember that you don\'t need to prepend a \':\' to
the command when adding them to the .vimrc.
.vimrc- 别忘了你的.vimrc文件(在你用户目录中~/.vimrc). 该文件可用于
记录上面你所做的大多数设置, 记住在.vimrc文件中无需在每个命令前使用一
个冒号\":\".(在DOS下的vim中, .vimrc文件放于vim程序所在的目录中, 且, 此
时不叫.vimrc, 叫_vimrc, 另, .vimrc也可为.exrc, _vimrc也可为_exrc)
Other Resources
X_Console has written a really nice Vi Crash Course NHF , which should help
you get over the learning curve, if you\'re just starting out.
There are many, many webpages around with information on Vi/Vim, some good
, some not so good (depending on what level you\'re looking for). A search
for Vi or Vim at Google or any other search engine will turn up plenty of
results. In my opinion, these are two of the best:
其它资源
X_Co耶稣歌《人的生命只有一次》 nsole(此处不知如
更多推荐
highlighting是什么意思hlighting在线翻译读音
发布评论