Skip to content

Commit 03fa8c2

Browse files
committed
Add documentation
1 parent 7449030 commit 03fa8c2

File tree

10 files changed

+159
-28
lines changed

10 files changed

+159
-28
lines changed

README.md

Lines changed: 142 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,158 @@
1-
# Vim as a Python IDE
1+
# Contents
22

3-
This repo contains a script to build vim from the source, and install a set
4-
of plugins that will make VIM look like Python IDE.
3+
This project aims to use Vim as a powerful and complete Python IDE. In order
4+
to do that, we curated a list of awesome plugins available in the community and
5+
provided an automatic installation procedure for this set.
56

6-
Please check the available features and the plugins that enable them:
7+
<img src="./docs/img/vim.png?raw=true"/>
78

8-
## Syntax Highlighting
9+
## Installation
910

10-
## Color Themes
1111

12-
## Project Navigation
12+
### Requirements for Ubuntu distros
1313

14-
- Nerdtree
15-
- Tags
16-
- Fzf
14+
```bash
15+
sudo apt install libncurses5-dev libgnome2-dev libgnomeui-dev \
16+
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
17+
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
18+
python3-dev git
19+
```
1720

18-
## Powerfull Full Text search
21+
### Requirements for Fedora distros
1922

20-
- Ripgrep
23+
```bash
24+
sudo dnf install -y ctags git python python-devel \
25+
python3 python3-devel tcl-devel
26+
```
2127

22-
## Real time linting
23-
- Ale
28+
### Installation process
2429

25-
## Code navigation
30+
```bash
31+
git clone https://github.com/rapphil/vim-python-ide.git && \
32+
cd vim-python-ide && ./install.sh
33+
```
2634

27-
- guttentag + jedi
35+
## Features
2836

29-
## Code refactoring
37+
Please check the available features and the plugins that enable them.
3038

31-
Jedi + Rope
32-
- Extract method
33-
- Rename functions
39+
### Syntax Highlighting
3440

35-
## Code completion
36-
https://github.com/davidhalter/jedi-vim
37-
## Snippets
41+
Syntax highlighting for several languages, besides Python.
3842

39-
Snippets save time while you type and create standardization
43+
Powered by:
4044

41-
## Git Integration
45+
* [vim-polyglot](https://github.com/sheerun/vim-polyglot)
46+
47+
### Color Themes
48+
49+
Several popular color schemes:
50+
51+
* Monokai
52+
* Gruvbox
53+
* Much more
54+
55+
Powered by:
56+
57+
* [vim-colorschemes](https://github.com/flazz/vim-colorschemes)
58+
59+
60+
### Project Navigation
61+
62+
Easily navigate your project using:
63+
64+
* File tree explore (Nerdtree)
65+
![Nerdtree](./img/nerdtree.gif)
66+
* Fuzzy finder based on the file names
67+
![fuzzy-finder](./img/fzf.gif)
68+
* File structure (classes, functions, methods).
69+
![tagbar](./img/tagbar.gif)
70+
Powered by:
71+
72+
* [Nerdtree](https://github.com/scrooloose/nerdtree)
73+
* [Fzf](https://github.com/junegunn/fzf.vim)
74+
* [Tagbar](https://majutsushi.github.io/tagbar/)
75+
76+
### Powerfull Full Text search
77+
78+
* Full text search based on both exact match and fuzzy finder capabilities
79+
* Extremely fast.
80+
![ripgrep](./img/ripgrep.gif)
81+
Powered by:
82+
83+
* [Ripgrep](https://github.com/BurntSushi/ripgrep)
84+
* [Fzf](https://github.com/junegunn/fzf.vim)
85+
86+
### Real time linting
87+
88+
Lint source files in real time an check for errors and warnings.
89+
90+
Powered by:
91+
92+
* [Ale](https://github.com/w0rp/ale)
93+
94+
### Code navigation
95+
96+
* Go to function definitions
97+
* Check parameters and docstrings easily.
98+
99+
Powered by:
100+
101+
* [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags)
102+
* [jedi-vim](https://github.com/davidhalter/jedi-vim)
103+
104+
### Code refactoring
105+
106+
Extract methods, variables and rename functions easily.
107+
108+
Powered by:
109+
110+
* [jedi-vim](https://github.com/davidhalter/jedi-vim)
111+
* [rope-vim](https://github.com/python-rope/ropevim)
112+
113+
### Code completion
114+
115+
Use hints and dialog boxes to speed your development using code completion.
116+
117+
Powered by:
118+
119+
* [jedi-vim](https://github.com/davidhalter/jedi-vim)
120+
121+
### Snippets
122+
123+
Snippets save time while you type and creates standardization for your code.
124+
125+
Powered by:
126+
127+
* [vim-snippets](https://github.com/honza/vim-snippets)
128+
* [ultisnips](https://github.com/SirVer/ultisnips)
129+
130+
### Git Integration
131+
132+
Perform git operations and highlight changes in the repo.
133+
134+
Powered by:
135+
136+
* [vim-fugitive](https://github.com/tpope/vim-fugitive)
137+
* [vim-gitgutter](https://github.com/airblade/vim-gitgutter)
138+
139+
## Key bindings
140+
141+
| Action | Mode | key binding |
142+
|--------------------------|------------------|-----------------|
143+
| Toogle Nerdtree | Normal | `crtl + n` |
144+
| toogle Tagbar | Normal | `f8` |
145+
| Look for file | Normal | `crtl + p` |
146+
| Goto definition | Normal | `crtl + ]` |
147+
| Show docstring | Normal | `K` |
148+
| Extract method | Normal/Visual | `crlt + c r m` |
149+
| Auto complete | Insert | `crtl + space` |
150+
| Expand snippet | Insert |`tab` |
151+
152+
## Commands
153+
154+
| Command Description | Command |
155+
|--------------------------------|----------------|
156+
| Look for string | `:Rg <string>` |
157+
| git status | `:Gstatus` |
158+
| git diff | `:Gdiff` |

configs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ let g:UltiSnipsExpandTrigger='<tab>'
5353
let g:UltiSnipsListSnippets='<c-tab>'
5454
let g:UltiSnipsJumpForwardTrigger='<c-j>'
5555
let g:UltiSnipsJumpBackwardTrigger='<c-k>'
56+
57+
nmap <F8> :TagbarToggle<CR>
58+

docs/img/fzf.gif

586 KB
Loading

docs/img/nerdtree.gif

504 KB
Loading

docs/img/ripgrep.gif

647 KB
Loading

docs/img/tagbar.gif

457 KB
Loading

docs/img/vim.png

340 KB
Loading

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22

33
VIM_VERSION="v8.1.0664"
4-
54
CURDIR=${PWD}
65
CPUS=$(grep -c ^processor /proc/cpuinfo)
76

7+
read -p "Please backup your .vimrc file and .vim directory before starting. Press [Enter] to continue."
8+
89
git clone --branch $VIM_VERSION https://github.com/vim/vim.git /tmp/vim-build/
910
cd /tmp/vim-build
1011

@@ -17,6 +18,7 @@ pip2 install --user rope jedi ropevim flake8
1718
cp ${CURDIR}/vimrc ${HOME}/.vimrc
1819

1920
UPDATE_PATH='export PATH=${HOME}/tools/vim/bin:$PATH'
21+
2022
export PATH=${HOME}/tools/vim/bin:$PATH
2123

2224
if grep -qF "$UPDATE_PATH" ${HOME}/.bashrc; then
@@ -25,11 +27,9 @@ else
2527
echo "$UPDATE_PATH" >> ${HOME}/.bashrc
2628
fi
2729

28-
2930
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
3031
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
3132

32-
3333
vim -u ${CURDIR}/plugins +PlugInstall! +qall!
3434

3535
cat ${CURDIR}/plugins ${CURDIR}/configs > ${HOME}/.vimrc

mkdocs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
site_name: Vim as a Python IDE
2+
site_author: "Raphael Philipe Mendes da Silva"
3+
site_description: "Small side project to provide an out-of-box Python IDE based on Vim and a set of community plugins"
4+
repo_url: "https://github.com/rapphil/vim-python-ide"
5+
6+
google_analytics: ["UA-131814198-1", "auto"]
7+
theme:
8+
name: 'material'
9+
feature:
10+
tabs: true

0 commit comments

Comments
 (0)