Vim uses tip to write Python programs
- Insert header information automatically:
#!/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
- Use
:vs + 文件名
to split a window vertically
- Use
Ctrl + w
to quickly switch between windows
Writing markdown Files
- When writing the markdown file (
*.md
), press in normal mode to md
generate the corresponding file in the current directory html
- 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
003_vim using Tip