Switch to win7 64bits

Editing with vim -1-

code6 posted @ 2012年2月11日 22:39 in practice with tags vim , 1496 阅读

慢慢写点东西,培养这种习惯,这次从vim下手吧。

工作后开始使用vim,算起来也用了好久了,目前还是入门选手,不是很熟,偶尔多学了一点技巧,对vim的喜爱就更加深一点。简单记录一些,当做备忘来着。

Next/Prev

很经常是希望回到上一个位置或者下一个位置,这时候记一些快捷键就很方便了。

  • 查询vim帮助时, 比如在标签|bars| 上然后输入 CTRL-],则跳转到这一主题, CTRL-T 或 CTRL-O 跳回。
  • 键入 '/' 时查找特定字符串时, 可以按 n 查找下一个,按 ? 查找上一个。直接在词上按 * 则查找下一个, 按 # 则查找上一个。
  • 比如我喜欢使用多标签页而非多个split窗口,则可以将 tabpervious, tabnext 映射一下,比如Ctrl+N, Ctrl+P
" Switch tabs
nmap <C-N> :tabnext<CR>
nmap <C-P> :tabprevious<CR>

Replace

替换基本上只需要一个简单的式子即可:

:[range]s/pattern/string/[c,e,g,i]

其中c会询问每次替换是否执行, g为整行, i为不区分大小写。
有时区域的约束还不够的时候,我们可以先进行行级别查找再替换, 即

g/foo/s/bar/zzz/g

Select

一个比较实用的是在normal模式下使用Ctrl + V可以进行块选择
在Ctrl + V选择若干行后, 按 I 进入编辑模式, 输入字符串后再按两下 Esc 则会在选择的行前都加上此字符串(Ctrl + V + I + str + Esc + Esc)。

plugin

之前都不太用插件,后来稍微研究了下,现在有在用的也差不多就是NERDTree吧,确实还挺好用的。感觉一般常用vimrc配置一下也差不多即可了,我的vimrc也是在前人的基础上简单修改的,目前放到

Some Links

lazycat 说:
2012年2月12日 10:36

GITHUB Orz

netflix tv8 说:
2023年7月15日 00:11

Netflix propose une gamme de films, d’émissions de télévision et de contenus originaux pour un abonnement mensuel raisonnable. Netflix peut être vu sur Smart TV, un appareil de diffusion en continu ou un système de jeu moderne doté d’une connectivité Internet. netflix tv8 Certains appareils nécessitent que vous activiez l’appareil avant de vous connecter. Ceci est habituel avec les nouveaux appareils ou ceux qui viennent de recevoir des modifications logicielles.

9th Class Exemplar 说:
2023年8月24日 13:37

Exemplar Problems and Solutions Required for CBSE Exam, as well as useful to form the Foundation in the NCERT Examination, Students Download the latest NCERT Exemplar Problems Class 9 in Pdf Format, in both Hindi and English. Urdu Medium You can also buy them from the links given.Our website we are Providing the NCERT 9th for all Chapters of class All the Questions are 9th Class Exemplar Problem for NCERT 2024 very Important for the Upcoming class Exam, All the NCERT Class Exemplar Solutions 2024 for English, Hindi, Mathematics, Sanskrit, Science, Social Science, Urdu have been Explained in a way to help Students Thoroughly Understand the concept

seo service london 说:
2024年1月16日 21:30

Hello. Great job. I did not anticipate this. This is a splendid articles


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter