[关闭]
@Guoguo0605 2016-04-02T00:23:08.000000Z 字数 1786 阅读 1613

Homework 02 - Installing Vim and Its Plugin

ComputationalPhysics_HW 岳绍圣2013301020033


CONTENT:

0. Requests

1. Begin Editing with VIM

When I tried to input vim firstvim.txt in terminal, it tells me vim is not installed yet in my ubuntu, So according to the prompt, I typed sudo apt-get install vim, here is a screen shot of the process of installing vim:

4

1.1 Simple vim commands

Only some simple VIM commands are needed to write a text:

  • i ----- insert mode, press esc can go back to normal mode.
  • hjkl ---- move cursor(太奇葩了...)
  • In normal mode:
    • :wq ---- save and quit
    • x ---- delete the character below cursor
    • u ---- undo
    • y ---- copy
    • p ---- paste

Currently, those commands are enough for simple use. And for convenience, I just post the full commands picture below:

5

2. Install Thesaurus_query Plugin for vim

This plugin uses three backends to support its function, two of which need internet access. They are: Thesaurus.com; datamuse.com; mthesaur_txt(Need not Internet).

2.1 Install Plugin Manager --- Pathogen

To manage our plugins conveniently, a plugin manager is needed. Pathogen is exactly such a tool.

Steps to install Pathogen:
1. download install package pathogen.zip
2. Extract it to ~/.vim/ (Hint: this directory is hidden as default)
3. Create and edit file ~/.vimrc with vim, add

  1. call pathogen#infect()
  2. syntax on
  3. filetype plugin indent on

After last step, pathogen installation is over.
Any time you want to install a plugin, just open terminal under ~/.vim/bundle/, and git clone the plugin.

2.2 Install Plugin Thesaurus_Query

Only need to type command:

  1. git clone https://github.com/ron89/thesaurus_query.vim ~/.vim/bundle/thesaurus_query.vim

Here is a screen shot showing my successful installation of vim plugin Thesaurus Query:

5

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注