VIM

[译]Vim每日技巧-EX命令

Vim支持很多EX命令(:开头的命令),使用这些命令可以提高编辑的效率。输入:help holy-grail可以查看所有EX命令的完整列表。

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Ex Commands

VIM

[译]Vim每日技巧-跳转到光标所在的文件

在编辑文件时,如果光标停在一个文件名上,那么在normal模式下按gf,就会在同一窗口中打开这个文件。如果是按ctrl+w f(先按ctrl+w,再按f),则在新编辑窗口中打开文件,如果是按ctrl+w gf,则在新的tab页打开文件。

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: GOTO File Under Cursor (not harmful)

[转]R programming books (updated)

原文地址:R programming books (updated) | (R news & tutorials)

via R-bloggers by csgillespie on 1/28/11


In a recent post, I asked for suggestions for introductory R computing books. In particular, I was looking for books that:

  • Assume no prior knowledge of programming.
  • Assume very little knowledge of statistics. For example, no regression.
  • Are cheap, since they are for undergraduate students.

Some of my cons aren’t really downsides as such. Rather, they just indicate that the books aren’t suitable for this particular audience. A prime example is “R in a Nutshell”.

I ended up recommending five books to the first year introductory R class.

Recommended Books

  • A first course in statistical programming with R (Braun & Murdoch)
    • Pros: I quite like this book (hence the reason I put it on my list). It has a nice collection of exercises, it “looks nice” and doesn’t assume knowledge of programming. It also doesn’t assume (or try to teach) any statistics.
    • Cons: When describing for loops and functions the examples aren’t very statistical. For example, it uses Fibonacci sequences in the while loop section and the sieve of Eratosthenes for if statements.
  • An introduction to R (Venables & Smith)
    • Pros: Simple, short and to the point. Free copies available. Money from the book goes to the R project.
    • Cons: More a R reference guide than a textbook.
  • A Beginner´s Guide to R by Zuur.
    • Pros: Assumes not prior knowledge. Proceeds through concepts slowly and carefully.
    • Cons: Proceeds through concepts very slowly and carefully.
  • R in a Nutshell by Adler.
    • I completely agree with a recent review by Robin Wilson: “Very comprehensive and very useful, but not good for a beginner. Great book though – definitely has a place on my bookshelf.”
    • Pros: An excellent reference.
    • Cons: Only suitable for students with a previous computer background.
  • Introduction to Scientific Programming and Simulation Using R by Jones, Maillardet and Robinson.
    • Pros: A nice book that teaches R programming. Similar to the Braun & Murdoch book.
    • Cons: A bit pricey in comparison to the other books

Books not being recommended

These books were mentioned in the comments of the previous post.

  • The Basics of S-PLUS by Krause & Olson.
    • Most students struggle with R. Introducing a similar, but slightly different language is too sadistic.
  • Software for Data Analysis: Programming with R by Chambers.
    • Assumed some previous statistical knowledge.
  • Bayesian Computation with R by Albert.
    • Not suitable for first year students who haven’t taken any previous statistics courses.
  • R Graphics by Paul Murrell
    • I know graphics are important, but a whole book for an undergraduate student might be too much. I did toy with the idea of recommending this book, but I thought that five recommendations were more than sufficient.
  • ggplot2 by Hadley Wickham.
    • Great book, but our students don’t encounter ggplot2 in their undergraduate course.

Online Resources

  • Introduction to Probability and Statistics by Kerns
    • Suitable for a combined R and statistics course. But I don’t really do much stats in this module.
  • The R Programming wikibook (a work in progress).
    • Will give the students this link.
  • Biological Data Analysis Using R by Rodney J. Dyer. Available under the CC license.
    • Nice resource. Possibly a little big for this course (I know that this is very picky, but I had to draw the line somewhere). Will probably use it for future courses.
  • Hadley Wickham’s devtools wiki (a work in progress).
    • Assumes a good working knowledge of R
  • The R Inferno by Patrick Burns
    • Good book, but too advanced for students who have never programmed before.
  • Introduction to S programming
    • It’s in french – this may or may not be a good thing depending on your point of view ;)
VIM

[译]Vim每日技巧-配色方案

Vim 7.x开始支持更换配色方案。配色方案保存在Vim安装目录下的colors子目录下。看一下这个目录,选一种方案,在Vim中输入类似:colorscheme blue这样的命令,试一下效果。文字会根据语法不同显示不同的颜色,但保持相对醒目。在你自己的vimrc文件中设置你喜欢的颜色,或是定制你自己的配色方案。

下面这个网站有很多方案:http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Color Schemes

VIM

[译]Vim每日技巧-时间旅行

谁说MAC OS X系统垄断了时间机器?Vim也可以进行时间旅行。从7.x开始,你可以输入:earlier 4h返回到正在编辑文件4小时之前的状态,可以再用:later 4h返回到4小时后。具体使用:help earlier查看该命令的具体选项。注意,最远能够返回多久,取决于”undolevels”的设置。

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Time Travel

VIM

[译]Vim每日技巧-命令行历史

是不是有时候会想要查看已经执行过的ex命令?很简单,在normal模式下按q:,就会打开命令行历史窗口。在这个窗口,你可以复制或者执行命令。要回到normal模式,输入:q。

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Command Line History
注:原文说按ctrl+f也可以进入命令行历史,我这里好象不行,不知道是不是重新定义了。

VIM

[译]Vim每日技巧-插入复合字母

编辑文件时,有时候需要在文件中插入二进制字符的替换形式,比如^M。或者需要插入ü这样的复合字母。用Vim做这件事情很容易。输入:digraph,会显示一个可用的特殊字符列表。选出你要的字符,记住对应的代码,然后进入插入模式,按ctrl+k后,再按相应的代码,即可。比如要插入刚才说的带点的u,按ctrl+k u:即可。注意,在ex命令行中可以使用同样的方法输入特殊字符。你还可以编辑一个宏以方便使用。

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Diagraphs
btw:原文标题疑为拼写错误。

Linux Documentation Project

Linux Documentation Project (LDP) 是一个关于Linux系统相关文档的项目。详细信息请参考项目指南The Linux Documentation Project: Guides

VIM

[译]Vim每日技巧-从系统剪贴板粘贴文本

“+gP

译注:在我的机子上,”+p也行。

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Paste Text from OS Clipboard

VIM

[译]Vim每日技巧-将文本复制到系统剪贴板

在Vim或GVim中,进入visual模式,高亮选中你要复制的文本,然后按”+y就可以复制到系统剪贴板。

本篇来源:Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Copy Text to OS Clipboard

无觅相关文章插件,快速提升流量