关闭

VIM 命令图解

651人阅读 评论(0) 收藏 举报
分类:

vgod's vimrc


图转自:http://blog.vgod.tw/

 PDF版下載


Author: Tsung-Hsiang (Sean) Chang vgod@vgod.tw

Fork me on GITHUB https://github.com/vgod/vimrc.

ONE-STEP INSTALL

Use curl (for Mac OS X):

 curl -o - https://raw.githubusercontent.com/vgod/vimrc/master/auto-install.sh | sh

or wget (for most UNIX platforms):

 wget -O - https://raw.githubusercontent.com/vgod/vimrc/master/auto-install.sh | sh

MANUALLY INSTALL

  1. Check out from github

    git clone git://github.com/vgod/vimrc.git ~/.vim
    cd ~/.vim
    git submodule update --init
    
  2. Install ~/.vimrc and ~/.gvimrc

    ./install-vimrc.sh
    
  3. (Optional, if you want Command-T) Compile the Command-T plugin

    cd .vim/bundle/command-t/ruby/command-t
    ruby extconf.rb
    make
    

MANUALLY INSTALL ON WINDOWS

  1. Check out from github

    cd C:\Program Files\Vim   (or your installed path to Vim)
    rmdir /s vimfiles         (This deletes your old vim configurations. If you want to keep it, use move instead of rmdir.)
    git clone git://github.com/vgod/vimrc.git vimfiles
    git submodule update --init
    
  2. Install vimrc. Add the following line at the end of C:\Program Files\Vim\vimrc.

    source $VIM/vimfiles/vimrc
    

INSTALL & UPGRADE PLUGIN BUNDLES

All plugins (except vim-latex) were checked out as git submodules, which can be upgraded withgit pull. For example, to upgrade Command-T

 cd ~/.vim/bundle/command-t
 git pull

To install a new plugin as a git submoudle, type the following commands.

 cd ~/.vim
 git submodule add [GIT-REPOSITORY-URL] bundle/[PLUGIN-NAME]

HOW TO USE

see the "USEFUL SHORTCUTS" section in vimrc to learn my shortcuts.

PLUGINS

  • Pathogen: Pathogen let us install a plugin as a bundle in ~/.vim/bundle seprately.

  • Nerd Tree: A tree explorer plugin for navigating the filesystem.

    Useful commands:
    :Bookmark [name] - bookmark any directory as name
    :NERDTree [name] - open the bookmark [name] in Nerd Tree

  • AutoClose: Inserts matching bracket, paren, brace or quote.

  • vim-multiple-cursors: True Sublime Text style multiple selections for Vim.

  • vim-surround: deal with pairs of surroundings.

  • matchit: extended % matching for HTML, LaTeX, and many other languages.

  • xmledit: XML/HTML tags will be completed automatically.

  • Command-T: open and navigate between files withcmd-t.

  • SuperTab: Do all your insert-mode completion with Tab.

  • snipMate: TextMate-style snippets for Vim

    :help snipMate to see more info.

  • YankRing: Maintains a history of previous yanks, changes and deletes

    :help yankring to see more info.

  • VisIncr: Produce increasing/decreasing columns of numbers, dates, or daynames.

  • Cute Error Marker: showing error and warning icons on line.

    MacVim users need to enable "Use experimental renderer" to seegraphical icons.

  • vim-latex: Latex support.

  • OmniCppComplete: C/C++ omni-completion with ctags database.

  • JavaComplete: Java Omni-completion.

  • EasyMotion: An easy way to jump to a word.

    Useful commands:
    ,,w forward EasyMotion
    ,,b backward EasyMotion

  • TagBar: browsing the tags of source files ordered by classes.

    Useful commands:
    F7 toggles the TagBar

  • Indent Motion: Vim motions to the start and end of the current indentation-delimited block

    Useful commands:
    ,] move to the end of the current indentation-delimited block (very useful in Python and CoffeeScript),[ move to the beginning of the current indentation-delimited block (very useful in Python and CoffeeScript)

  • Zen Coding: expanding abbreviation like zen-coding.

    Useful commands:
    <ctrl-y>, expand zen-coding abbreviation.

  • ack.vim: run ack (a better grep) from vim, and shows the results in a split window.

    :Ack [options] {pattern} [{directory}]

  • Git Gutter: shows a git diff in the 'gutter' (sign column). It shows whether each line has been added, modified, and where lines have been removed.

Language specific supports

  • Latex: Read :help latex-suite.txt
  • Restructured Text: ctrl-u 1~5 inserts Part/Chapter/Section headers
  • HTML, Javascript, CoffeeScript, Python, CSS, C, C++, Java: use TAB to do omni-completion.
  • HTML/XML: End tags are automatically completed after typing a begin tag. (Typing > twice pushes the end tag to a new line.)

Other good references

Vim Visual Cheat Sheet

I've compiled and plotted a Vim Cheat Sheet for beginners. Welcome to download and learn Vim with it.

My Vim Visual Cheat Sheet

These Vim Visual Cheat Sheets are released under Creative Commons Attribution-ShareAlike 3.0 Unported License.

License

This vimrc project is released under Creative Commons Attribution-ShareAlike 3.0 Unported License.

0
0
查看评论

Vim命令查看图

对经常使用Vim的程序员而言,掌握一般的h,j,k,l,dd,yy,x,p,u等基本命令虽说可以看代码,写代码了,但效率还不足以比windows下编辑器相比有优势,要想更大的提高效率,还有很多命令需要在实战中掌握。下面的两幅图是Vim命令的纵览,可以在使用中查询,熟能生巧。 第一幅列出了程序员常用的...
  • hjx5200
  • hjx5200
  • 2014-03-23 22:38
  • 3599

VIM命令 结构图

  • freexploit
  • freexploit
  • 2006-05-13 23:35
  • 1496

VIM总结之一:VIM编辑器常用命令详解

VIM编辑器常用命令详解(基础篇)                                      ...
  • mountzf
  • mountzf
  • 2016-06-23 11:12
  • 4596

vim 命令图解

vim 命令,vim是一个很好的编辑工具,下面为大家介绍一下vim入门基本命令。 方法/步骤 1 【vim 命令-启动vimtutor】:执行命令:vimtutor。vimtutor是vim使用入门教程。25到30分钟就可以入门。 2 【vim 命令-移动光标】:...
  • Fybon
  • Fybon
  • 2016-03-31 18:14
  • 407

图解VIM常用操作

入职差不多3周多了。接触了很多之前在学校接触不到的人,工具。这3周以来,我就好像是那“进了大观园的刘姥姥”,看什么都觉得新奇。尤其是看到组内大佬们都不用IDE,要么VIM,要么EMACS。而且用的真的很溜,让我佩服之极。今天趁着周六,我也来总结一下这几天我学到的关于vim的一些操作吧。都说VIM的门...
  • Marksinoberg
  • Marksinoberg
  • 2017-08-26 14:01
  • 6986

图解linux vim命令

看待一张很好的图解vim命令的图片,转给大家!
  • zyz511919766
  • zyz511919766
  • 2013-10-16 13:52
  • 2300

Centos 6.5 Install Vim

Install and Configure vim that is more convenience than vi. [1] Install Vim [root@dlp ~]# um -y install vim-enhanced ...
  • hanzheng260561728
  • hanzheng260561728
  • 2016-08-10 22:04
  • 448

vim 自定义命令

编辑 .vimrc 用command添加自己的命令, command相当于shell的alias如  command Lo TlistOpen command Lt TlistToggle 自定义命令必须以大写开头
  • xxkkff
  • xxkkff
  • 2010-01-10 13:10
  • 5746

Vim Global Command用法(g命令)

Task 删除一个文本文件中的所有带 ‘test’ 的行,以及这一行的前一行和后一行。 如何用Vim实现? Solution :g/test/-,/test/+ d 上面的命令是如何工作的呢?这你就需要了解vim的global命令(g命令) :g就是global命令语法: :[r...
  • huangkangying
  • huangkangying
  • 2016-01-12 20:50
  • 2466

sudo vim找不到命令(Ubuntu16.04)

在使用vim配置环境变量时,提示 sudo vim 找不到命令 原因是因为没有安装vim,下面我们就来在终端进行安装一下,前提是需要连上网了,没有联网不在此考虑范围 1.进入终端  Ctrl + Alt +T 出现终端窗口 2.输入命令: sudo apt-get install vim...
  • zht741322694
  • zht741322694
  • 2018-01-03 11:45
  • 931
    个人资料
    • 访问:1936494次
    • 积分:22202
    • 等级:
    • 排名:第392名
    • 原创:102篇
    • 转载:1385篇
    • 译文:6篇
    • 评论:261条
    联系方式
    个人邮箱: xuxiduo@zju.edu.cn
    QQ群:
    1)OpenCV俱乐部
        186168905

    2) 视频/音频/图像/算法/ML
        群1:148111910

        群2:157103105

    备注:加群需要回答问题,避免广告党。
    如果你是博客看到后加的,请注明“博客”并回答问题,只注明”博客“不回答问题的恕不加入。答案为和群相关的任何技术名词,不能出现1)和2)中的任何字眼
    博客专栏
    文章分类
    最新评论