@Guoguo0605
2016-04-02T00:23:08.000000Z
字数 1786
阅读 1657
ComputationalPhysics_HW
岳绍圣2013301020033
CONTENT:
- 自学vim相关操作
- 安装贺翀师兄写的vim插件Thesaurus Query,并点赞
- 自己用How to think like a computer scientist -- Learning with Python: Interactive Edition 2.0进行python语法练习(I)
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:
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:
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).
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
call pathogen#infect()
syntax on
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.
Only need to type command:
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: