word list 1

heir apparent – 王子,太子,王储
successor – 接班人
appropriate – 适当的,恰如其分的
sexual appetite – 性欲
objective appraisal – 客观的评价
throne – 王位
ample – 充分的,富裕的,宽敞的,宽大的
adequate – 足够的,充分的,恰当的
affluent – 丰富的,富裕的
appal – 使胆颤,使惊骇
appoint – 任命,委任,约定,指定
assign – 分配,委派,指定
assist – 帮助,援助,协助
annoy – 使烦恼,是生气,打扰
arrogant – 傲慢的,自大的
boast – 自夸,大话,自夸,夸耀
assess – 股价,评价
practice at the bar – 开业当律师
read for the bar – 读法律
bench and bar – 法官和律师
barrels of money – 家财万贯
acute – 敏锐的,尖锐的,(疾病)急性的
attain – 达到,获得
achieve
audit – 审查,稽查,审计,查账
augment – 扩大,增加,提高
auxiliary – 辅助的,补助的
bait – 饵,诱饵,诱惑物,欺负,折磨,中途休息
clergy – (集合称)牧师,僧侣,神职人员
adhere cling coherent
commence 开始
commerce 商业,贸易

Popularity: 12% [?]

发表在 未分类 | 留下评论

批量改名

1.rename命令批量修改文件名, 其实linux下可以使用别的办法来批量修改文件名, 不过rename实在太方便了

比如把所有的表为cdb1_* 修改为cdb_*的
在本目录下
只需要# rename ‘cdb1′ ‘cdb’ *

以前都是写个for循环来做…想想多傻啊, 呵呵

rename还有更多的功能, 建议man rename下

From:http://www.hao32.com/unix-linux/42.html

2.批量更改文件名 rename

通过 man rename 命令可以得知,rename 命令其实是一个 Perl 脚本命令,
它专用于批量地给多文件重命名(rename multiple files)。

命令格式:
rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
perlexpr 是一种 Perl 脚本格式的正则表达式。
参数:
-v, –verbose
Verbose: print names of files successfully renamed.
详细模式:打印成功更改的文件名列表
-n, –no-act
No Action: show what files would have been renamed.
测试模式:并不真正的执行命令,而只是显示哪些文件名应该怎么进行
更改,用于测试模式。
-f, –force
Force: overwrite existing files.
强制模式:在更改文件名,如果更改后的文件已经存在时覆盖已经存在
的文件。

rename 的典型应用:

0. 批量更改文件扩展名
$ ls
1.txt 2.txt 3.txt 4.txt
$ rename ‘s/\.txt/\.ext/’ *
$ ls
1.ext 2.ext 3.ext 4.ext
1. 批量删除文件扩展名
$ ls
1.txt 2.txt 3.txt 4.txt
$ rename ‘s/\.txt//’ *
$ ls
1 2 3 4
2. 批量添加文件扩展名
$ ls
1 2 3 4
$ rename ‘s/$/\.txt/’ *
$ ls
1.txt 2.txt 3.txt 4.txt
3. 按自己的方式批量重命名文件
$ ls
1.ext 2.ext 3.ext 4.ext
$ rename ‘s/(\d)/第$1 章/’ *
$ ls
第 1 章.ext 第 2 章.ext 第 3 章.ext 第 4 章.ext

3.

方法1:把文件名拆分处理,可以任意修改文件名
find -name ‘*.log’ -printf %f\\n|awk -F’.’ ‘{print $1}’|xargs -i{} mv {}.log xiyun_{}.log
方法2:利用rename
一般的linux下的rename命令比较简单
rename ‘test’ ‘xiyun’ ‘*.log’
把文件名中的某部分字符串替换掉
ubuntu下的rename命令支持正则表达式,因此功能更强大。
方法3:直接利用find和xargs和mv,中间不用awk,这样只能添加后缀名,不能修改文件名。

Popularity: unranked [?]

发表在 Ubuntu | 留下评论

Ubuntu 安装和使用过程中遇到的问题总结

GNOME 桌面和GNE 之间转换的

在英文环境下安装小企鹅输入法 fcitx

但是安装后又会出现一个问题就是 有一些英文字体变得非常细小丑陋。

安装和使用 WinRAR for Linux 下载地址
1.下载下来之后tar解压,
2.使用 sudo sh your_dir/makefile 命令来安装.
3.开始使用,解压rar的命令: rar e your_rar_file.rar

Popularity: 3% [?]

发表在 Ubuntu | 标签为 | 留下评论

Linux 解压缩命令

.tar
  解包:tar xvf FileName.tar
  打包:tar cvf FileName.tar DirName
  (注:tar是打包,不是压缩!)
  ———————————————
  .gz
  解压1:gunzip FileName.gz
  解压2:gzip -d FileName.gz
  压缩:gzip FileName
  .tar.gz 和 .tgz
  解压:tar zxvf FileName.tar.gz
  压缩:tar zcvf FileName.tar.gz DirName
   ———————————————
  .bz2
  解压1:bzip2 -d FileName.bz2
  解压2:bunzip2 FileName.bz2
  压缩: bzip2 -z FileName
  .tar.bz2
  解压:tar jxvf FileName.tar.bz2
  压缩:tar jcvf FileName.tar.bz2 DirName
   ———————————————
  .bz
  解压1:bzip2 -d FileName.bz
  解压2:bunzip2 FileName.bz
  压缩:未知
  .tar.bz
  解压:tar jxvf FileName.tar.bz
  压缩:未知
   ———————————————
  .Z
  解压:uncompress FileName.Z
  压缩:compress FileName
  .tar.Z
  解压:tar Zxvf FileName.tar.Z
  压缩:tar Zcvf FileName.tar.Z DirName
   ———————————————
  .zip
  解压:unzip FileName.zip
  压缩:zip FileName.zip DirName
   ———————————————
  .rar
  解压:rar x FileName.rar
  压缩:rar a FileName.rar DirName

  rar请到:http://www.rarsoft.com/download.htm 下载!
  解压后请将rar_static拷贝到/usr/bin目录(其他由$PATH环境变量指定的目录也可以):
   [root@www2 tmp]# cp rar_static /usr/bin/rar
   ———————————————
  .lha
  解压:lha -e FileName.lha
  压缩:lha -a FileName.lha FileName

  lha请到:http://www.infor.kanazawa-it.ac.jp/~ishii/lhaunix/下载!
  >解压后请将lha拷贝到/usr/bin目录(其他由$PATH环境变量指定的目录也可以):
  [root@www2 tmp]# cp lha /usr/bin/
   ———————————————
  .rpm
  解包:rpm2cpio FileName.rpm | cpio -div
   ———————————————
  .deb
  解包:ar p FileName.deb data.tar.gz | tar zxf -
   ———————————————
  .tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm

.deb .slp .arj .rar .ace .lha .lzh .lzx .lzs .arc .sda .sfx .lnx

.zoo .cab .kar .cpt .pit .sit .sea
  解压:sEx x FileName.*
  压缩:sEx a FileName.* FileName

  sEx只是调用相关程序,本身并无压缩、解压功能,请注意!
  sEx请到: http://sourceforge.net/projects/sex下载!
  解压后请将sEx拷贝到/usr/bin目录(其他由$PATH环境变量指定的目录也可以):
  [root@www2 tmp]# cp sEx /usr/bin/

  参考文献:Linux 文件压缩工具指南
(其实看帮助是最好的方法,一般各个命令都可以用“–help”参数得到常用使用方法!)

  用户经常需要备份计算机系统中的数据,为了节省存储空间,常常将备份文件进行压缩。下面分别介绍备份与压缩的命令。

  tar命令

  tar可以为文件和目录创建档案。利用tar,用户可以为某一特定文件创建档案(备份文件),也可以在档案中改变文件,或者向档案中加入新的文件。 tar最初被用来在磁带上创建档案,现在,用户可以在任何设备上创建档案,如软盘。利用tar命令,可以把一大堆的文件和目录全部打包成一个文件,这对于备份文件或将几个文件组合成为一个文件以便于网络传输是非常有用的。Linux上的tar是GNU版本的。

  语法:tar [主选项+辅选项] 文件或者目录

  使用该命令时,主选项是必须要有的,它告诉tar要做什么事情,辅选项是辅助使用的,可以选用。

  主选项:

  c 创建新的档案文件。如果用户想备份一个目录或是一些文件,就要选择这个选项。

  r 把要存档的文件追加到档案文件的未尾。例如用户已经作好备份文件,又发现还有一个目录或是一些文件忘记备份了,这时可以使用该选项,将忘记的目录或文件追加到备份文件中。

  t 列出档案文件的内容,查看已经备份了哪些文件。

  u 更新文件。就是说,用新增的文件取代原备份文件,如果在备份文件中找不到要更新的文件,则把它追加到备份文件的最后。

  x 从档案文件中释放文件。

  辅助选项:

  b 该选项是为磁带机设定的。其后跟一数字,用来说明区块的大小,系统预设值为20(20*512 bytes)。

  f 使用档案文件或设备,这个选项通常是必选的。

  k 保存已经存在的文件。例如我们把某个文件还原,在还原的过程中,遇到相同的文件,不会进行覆盖。

  m 在还原文件时,把所有文件的修改时间设定为现在。

  M 创建多卷的档案文件,以便在几个磁盘中存放。

  v 详细报告tar处理的文件信息。如无此选项,tar不报告文件信息。

  w 每一步都要求确认。

  z 用gzip来压缩/解压缩文件,加上该选项后可以将档案文件进行压缩,但还原时也一定要使用该选项进行解压缩。

  例1:把/home目录下包括它的子目录全部做备份文件,备份文件名为 usr.tar。

  $ tar cvf usr.tar /home

  例2:把 /home目录下包括它的子目录全部做备份文件,并进行压缩,备份文件名为usr.tar.gz 。

  $ tar czvf usr.tar.gz /home

  例3:把usr.tar.gz这个备份文件还原并解压缩。

  $ tar xzvf usr.tar.gz

  例4:查看usr.tar备份文件的内容,并以分屏方式显示在显示器上。

  $ tar tvf usr.tar | more

  要将文件备份到一个特定的设备,只需把设备名作为备份文件名。

  例5:用户在/dev/fd0设备的软盘中创建一个备份文件,并将/home 目录中所有的文件都拷贝到备份文件中。

   $ tar cf /dev/fd0 /home

  要恢复设备磁盘中的文件,可使用xf选项:

  $ tar xf /dev/fd0

  如果用户备份的文件大小超过设备可用的存贮空间,如软盘,您可以创建一个多卷的tar备份文件。M选项指示tar命令提示您使用一个新的存贮设备,当使用M选项向一个软驱进行存档时,tar命令在一张软盘已满的时候会提醒您再放入一张新的软盘。这样您就可以把tar档案存入几张磁盘中。

  $ tar cMf /dev/fd0 /home

  要恢复几张盘中的档案,只要将第一张放入软驱,然后输入有x和M选项的tar命令。在必要时您会被提醒放入另外一张软盘。

  $ tar xMf /dev/fd0

  gzip命令

  减少文件大小有两个明显的好处,一是可以减少存储空间,二是通过网络传输文件时,可以减少传输的时间。 gzip是在Linux系统中经常使用的一个对文件进行压缩和解压缩的命令,既方便又好用。

  语法:gzip [选项] 压缩(解压缩)的文件名

  各选项的含义:

  -c 将输出写到标准输出上,并保留原有文件。

  -d 将压缩文件解压。

  -l 对每个压缩文件,显示下列字段:

  压缩文件的大小

  未压缩文件的大小

  压缩比

  未压缩文件的名字

  -r 递归式地查找指定目录并压缩其中的所有文件或者是解压缩。

  -t 测试,检查压缩文件是否完整。

  -v 对每一个压缩和解压的文件,显示文件名和压缩比。

  -num 用指定的数字num调整压缩的速度,-1或–fast表示最快压缩方法(低压缩比),-9或–best表示最慢压缩方法(高压缩比)。系统缺省值为 6。

  假设一个目录/home下有文件 mm.txt、sort.txt、xx.com。

  例1:把/home目录下的每个文件压缩成.gz文件。

  $ cd /home

  $ gzip *

  $ ls

  m.txt.gz sort.txt.gz xx.com.gz

  例2:把例1中每个压缩的文件解压,并列出详细的信息。

  $ gzip -dv *

  mm.txt.gz 43.1%—–replaced with mm.txt

  sort.txt.gz 43.1%—–replaced with sort.txt

  xx.com.gz 43.1%—–replaced with xx.com

  $ ls

   mm.txt sort.txt xx.com

  例3:详细显示例1中每个压缩的文件的信息,并不解压。

  $ gzip -l *

  compressed uncompr. ratio uncompressed_name

  277 445 43.1% mm.txt

  278 445 43.1% sort.txt

  277 445 43.1% xx.com

  $ ls

  mm.txt.gz sort.txt.gz xx.com.gz

  例4:压缩一个tar备份文件,如usr.tar,此时压缩文件的扩展名为.tar.gz

  $ gzip usr.tar

  $ ls

  usr.tar.gz

  unzip命令

  用MS Windows下的压缩软件winzip压缩的文件如何在Linux系统下展开呢?可以用unzip命令,该命令用于解扩展名为.zip的压缩文件。

  语法:unzip [选项] 压缩文件名.zip

  各选项的含义分别为:

  -x 文件列表 解压缩文件,但不包括指定的file文件。

  -v 查看压缩文件目录,但不解压。

  -t 测试文件有无损坏,但不解压。

  -d 目录 把压缩文件解到指定目录下。

  -z 只显示压缩文件的注解。

  -n 不覆盖已经存在的文件。

  -o 覆盖已存在的文件且不要求用户确认。

  -j 不重建文档的目录结构,把所有文件解压到同一目录下。

  例1:将压缩文件text.zip在当前目录下解压缩。

  $ unzip text.zip

  例2:将压缩文件text.zip在指定目录/tmp下解压缩,如果已有相同的文件存在,要求unzip命令不覆盖原先的文件。

  $ unzip -n text.zip -d /tmp

  例3:查看压缩文件目录,但不解压。

  $ unzip -v text.zip

  zgrep命令

  这个命令的功能是在压缩文件中寻找匹配的正则表达式,用法和grep命令一样,只不过操作的对象是压缩文件。如果用户想看看在某个压缩文件中有没有某一句话,便可用zgrep命令。

Popularity: 3% [?]

发表在 Linux | 标签为 | 留下评论

linuxcommand

http://linuxcommand.org/learning_the_shell.php

  • Most importantly, don’t embed spaces in file names.
pwd print working directory
cd change directory
cd followed by nothing change to home directory
ls list files and directories
 
ls list the files in the working directory
ls /dir list the files in the /dir directory
ls -l list the files in the working directory in long format
ls -l /dir1 /dir2 list the files in the /dir1 and /dir2 directory in long format
ls -la .. list all files in the parent directory in long format
. working directory(./ can be omitted
.. parent directory
less text_file  display the text_file 
file name_of_file  show file type 
   

File Type

File Type Descriptiong Viewable as text?
ASCII text yes
Bourne-Again SHell script text A bash script yes
ELF 32-bit LSB core file A core dump file no
ELF 32-bit LSB executable An executable binary program no
ELF 32-bit LSB shared object A shared library no
GNU tar archive A tape archive file.A common way of storing groups of files no, use tar tvf to view listing
gzip compressed data An archive compressed with gzip no
HTML document text A web page yes
JPEG image data no
PostScript document text A PostScript file yes
RMP A Red Hat Package Manager archive no, use rpm -q to examine contents
Zip archive data An archive compressed with zip no

Directories

Directory Descriptiong
/ The root directory
/boot This is where the Linux kernel and boot loader files are kept. The kernel is a file called vmlinuz
/etc Contains the configuration files for the system. All of the files in /etc should be text files.

  • /etc/passwd
    The passwd file contains the essential incormation for each user. It is here that users are defined.
  • /etc/fstab
    The fstab file contains a table of devices that get mounted when your system boots. This file defines your disk drives.
  • /etc/hosts
    The hosts file lists the network host names and IP addresses that are intrinsically known to the system.
  • /etc/init .d
    This directory contains the scripts that start various system services typically at boot time.
/bin. /usr/bin These two directories contain most of the programs for the system. The /bin directory has the essential programs that the system requires to operate, while /user/bin contains applications for the system’s users.
/usr The /usr directory contains a variety of things that support user applications. Some highlights:

  • /usr/share/X11
    Support files for the X Windows system
  • /usr/share/dict
    Dictionaries for the spelling checker. Bet you didn’t know that Linux had a spelling checker. See look and ispell
  • /usr/share/doc
    Various documentation files in a variety of formats
  • /usr/share/man
    The man pages are kept here.
  • /usr/src
    Source code files. If you install the kernel source package, you will find the entire Linux kernel source code here.
/usr/local /usr/local and its subdirectories are used for the installation of software and other files for use on the local machine. What this really means is that software that is not part of the official distribution goes here.

When you find interesting programs to install on your system, they should be installed in one of the /usr/local directories. Most often, the directory of chice is /usr/local/bin.

Popularity: 6% [?]

发表在 Linux | 标签为 | 留下评论

http://prezi.com

http://prezi.com

Popularity: 8% [?]

发表在 link | 标签为 | 留下评论

scanf

格式说明 输入数据格式
&d 输入十进制整型数
&i 输入整型数,可以是带前导0的八进制数整数和带前导0x的十六进制整数
&c 输入一个字符
&o 输入八进制整型数
&x 输入十六进制整型数
&u 输入无符号的十进制整型数
&f 以带小数点的形式或指数形式输入单精度数或双精度数

Popularity: 21% [?]

发表在 C/C++ | 留下评论

理性的思考

The most incomprehensible thing about the university is that it is comprehensible . -Albert Einstein

1.智慧设计

 

2.倒数永恒

3.恩宠之星


我觉得宇宙一一环套一环的。宇宙的目标是什么?

Popularity: 7% [?]

发表在 未分类 | 留下评论

将网站特定部位变成黑白的JS文件

http://james.padolsey.com/demos/grayscale/

Popularity: 7% [?]

发表在 网络资源 | 留下评论

Using jQuery The Sexy Way: 7 Great Techniques For a Slick Layout

Using jQuery The Sexy Way: 7 Great Techniques For a Slick Layout 从 DevSnippets 作者:Noura Yehia

Whatever content you have to present, you can present them in a more interactive & more responsive ways. In this article we’d like to present 7 Impressive techniques using some jQuery magic to grab the attention of your users with a simple, rich user experience that gets them excited about your website.

1. Nivo Slider

Nivo Slider is a lightweight (7kb compressed) jQuery plugin for creating good-looking image sliders with 9 unique transition effects.

Features Include:

Nivo Slider

To use the Nivo Slider you have to include jQuery, the Nivo Slider script and the Nivo Slider CSS on your page. The Nivo Slider has plenty of options to fiddle with. Below is an example of the code with all available options and their defaults:

<script type="text/javascript">
$(window).load(function() {
	$('#slider').nivoSlider({
		effect:'random',
		slices:15,
		animSpeed:500,
		pauseTime:3000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:true, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});
</script>

2. Flip

Flip is a jQuery plugin that will flip easily your elements in four directions.

Flip

Options Include:

  • contentdefine the new content of the flipped box. It works with: html, text or a jQuery object ex:$(“selector”)
  • directionthe direction where to flip. Possible values: ‘tb’, ‘bt’, ‘lr’, ‘rl’ (default:’tb’)
  • colorFlip element ending background color
  • speedSpeed of the two parts of the animation
  • onBeforeSynchronous function excuted before the animation starts
  • onAnimationSynchronous function excuted at half animation
  • onEndSynchronous function excuted after animation’s end

Using it is very easy:

$("#flipbox").flip({
	direction:'tb'
})

Add content params in this way:

$("#flipbox").flip({
	direction:'tb',
	content:'this is my new content'
})

Sponsor Flip Wall: Using PHP, CSS and jQuery with the jQuery Flip plug-in, the resulting code can be used to showcase your sponsors, clients or portfolio projects as well.

Sponsor Flip Wall

3. Coin Slider

Coin Slider is another Lightweight (8kb only) jQuery Image Slider with Unique Effects. The slider has an optional auto-slide feature and navigation box for browsing images easily. You can add links to your images.

Coin Slider

Coin Slider have a lot of options for helping you set slider as you want. If you want to have 900px wide slider, without navigation and with 5sec delay between images you’ll do this:

<script type="text/javascript">
	$(document).ready(function() {
		$('#coin-slider').coinslider({ width: 900, navigation: false, delay: 5000 });
	});
</script>

4. Reel

Reel is a jQuery plugin which takes an image tag and makes it a live “projection” of pre-built animation frames sequence. Its aim is to provide a 360° view of something or someplace. Great alternative to widely used Flash and Java techniques.

reel

The code below will simply make any image reel:

$('#my_image').reel()

Want to have 27 frames instead of 36 (default value):

$('#my_image').reel({ frames: 27 })

5. jPhotoGrid

jPhotoGrid makes it easy to put together a cool image grid from a list of photos. The plugin uses the browser’s image scaling to do the zoom. So the image should be appropriately sized to act as both a thumbnail and a zoomed image.

jPhotoGrid

The markup will be as simple as this:

<ul>
	<li>
		<img src="source.jpg" alt="" />
		<p>Caption Here</p>
	</li>
	...
<ul>

6. jQuery.popeye

jQuery.popeye is an advanced image gallery script to save space when displaying a collection of images and offer your users a nice and elegant way to show a big version of your images without leaving the page flow. Though the script is quick and easy to setup, it offers great flexibility in both behaviour and styling.

jQuery.popeye

jQuery.popeye takes a different approach: not only allows it for browsing all thumbnails as well as the large images in a single image space, it also repects the page flow and stays anchored and rooted in the webpage at all times, thus giving a less disruptive user experience than modal windows.

To tell the script which images, thumbnails and captions to use, there has to be a list like this one:

<ul>
    <li><a href="URL_OF_BIG_IMAGE"><img src="URL_OF_THUMBNAIL" alt="CAPTION_STRING" /></a></li>
    <li>...</li>
</ul>

7. presentationCycle

Presentation Cycle is a variation on the functionality of Cycle. Instead of generating a list of numbers that are clickable Presentation Cycle generates a progress bar that shows when the new slide will appear. It offers adjustable animation times and generates a navigation bar that also shows the progress.

presentationCycle

Depending on the settings of the script, it dynamically generates a progress bar adjusted to the number of slides in the Cycle container.

Author: Noura Yehia

Noura Yehia is a Web Designer, Blogger and Creative Thinker. Founder of Noupe.com a popular blog about web design, tutorials, resources and inspiration. If you’d like to connect with her, you can follow her on Twitter or at her blog Devsnippets.

Popularity: 48% [?]

发表在 Jquery | 留下评论

vi 命令

1. 普通模式
在shell中直接打vim filename就会进入普通模式。在这个状态,我们可以通过不同的按键对文件进行操作和切换到其它模式。按“:”可切换到命令模式,按i,o,a可进入编辑模。

1.1. 编辑
i
进入编辑模式。

o
在当前位置下插入一空行,进入编辑模式,光标位于空行的最开头。

a
光标后移一个字符,进入编辑模式。

v
这入可视模式,可用高亮的色块选择内容。

x or DEL键
删除当前字符,删除内容保存在缓冲区。

xp
左右字符互换。

dd
删除当前行,删除内容保存在缓冲区。

ddp
上下两行的内容互换。

d$
删除当前光标至行尾的所有内容。

dG
删除从当前行至文件未尾的所有行。

u
undo。

v
进地visual模式,移动光标可选择文本。

y
把当前行复制到缓冲区中。

p
把缓冲区中的文本插入到当前位置。

“ay
把当前行复制到a缓冲区。可用26个字母命名多个缓冲区。

“ap
把a缓冲区中的文本插入当前位置。

J
上下两行合并成一行。

.
英文句点的作用是重复执行上次执行的命令,如你按了”ap插入a缓冲区的内容,那你就可按”.”来重复这个操作。

1.2. 光标移动
h,j,k,l
在vim中,除了可使用光标键在移动光标外,还有一种更方便的光标移动方式。就是使用h,j,k,l这四个键来移动光标。h控制光标左移,j控制光标下移,k控制光标上移,l控制光标右移。通过使用这四个字母键就可使我们的手不用移动即可控制光标的移动。刚开始使用可能会有些不习惯,但熟练使用后你会发觉你的输入速度提高不少,强烈建议喜欢vim的朋友使用。

$
光标移动到行尾。

G
光标移动到文档末尾。

H,L
H控制光标移动到当前屏幕头,L控制光标移动到当前屏幕尾。

{,}
{控制光标上移一个段落,}控制光标下移一个段落

2. 编辑模式
ESC
退出编辑状态。

3. 命令模式
在普通模式上按“:”就可进入命令模式,在左下屏幕我们输入一些操作指令。

:q!
不保存退出vim。

:w
保存文档,但不退出vim。

:x
保存退出vim。

:! command
运行shell命令。

:e filename
编辑/打开一个文件

:s/emacs/vim
在当前行中把第一个emacs替换成vim。

:s/emacs/vim/g
把当前行中所有的emacs替换成vim。

:%s/emacs/vim/g
在全局范围内把emacs替换成vim。

:reg
列出缓冲区内容。

:set all
列出所有参数的配置情况。

:tabe
新建一个标签页。

:tabn or :tabp
切换到下一个\上一个标签页。

:close
关闭当前标签页。

:qa
关闭所有标签页退出。

Popularity: 19% [?]

发表在 未分类 | 留下评论