Https://github.com/ma6174/vim-deprecated Easy Installation Method:
Open the terminal and execute the following command to install it automatically:
wget -qO- https://raw.github.com/ma6174/vim/master/setup.sh | sh -x
or manually install it yourself: (in Ubuntu, for example)
- install Vim
sudo apt-get Install vim
- Install Ctags:
sudo apt-get install ctags
- Install some prerequisite programs:
sudo apt-get install xclip vim-gnome astyle python-setuptools
- Python Code formatting tool:
sudo easy_install -ZU autopep8
sudo ln -s /usr/bin/ctags /usr/local/bin/ctags
- Clone configuration file:
cd ~/ && git clone git://github.com/ma6174/vim.git
mv ~/vim ~/.vim
mv ~/.vim/.vimrc ~/
- Clone Bundle Program:
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
- Open vim and Execute bundle program
:BundleInstall
- Re-open Vim to see the effect
Writing a Python program
- Auto Insert header information:
#!/usr/bin/env python
# coding=utf-8
- Enter
.
or press TAB
key to trigger the code completion function
:w
Code errors and specifications are checked automatically after the code is saved
- Press to
F6
pep8
optimize code format by format
- Press
F5
to execute code with one click
Multi-window operation
- Use
:sp + 文件名
to split a window horizontally
- :vs + filename can split the window vertically
- use
ctrl + W
to quickly toggle between Windows
Writing markdown Files
- write Markdown file (
*.md
), press MD
can generate the corresponding html
File
- After the build or in normal mode
fi
, you can use Firefox to open the appropriate html
file preview
- Of course, you can also use the Universal
F5
key to convert and open the preview in one click
- If there is some confusing information on the screen during the opening process, you can press
Ctrl + l
to restore
Quick Notes
- Press
\
to automatically annotate according to file type
How to use
- Press F5 to directly compile and execute C, C + +, Java code, and execute shell scripts, press "F8" to debug C, C + + code
- Automatically insert header, new C, C + + source files automatically inserted header: including file name, author, contact, establishment time, etc., the reader can change their own according to the requirements
- Map "Ctrl + A" To select All and copy shortcut keys for easy copying of code
- Press "F2" to directly eliminate blank lines in the code
- "F3" to list the current directory file, open the tree-like file directory
- Support mouse selection, direction key movement
- Code highlighting, auto indent, display line number, display status line
- Press "Ctrl + P" to complete the auto-completion
[]、{}、()、""、‘ ‘
Automatic completion of all
Super-Easy VIM configuration