Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sloria/vim-ped
:athletic_shoe: Quickly open Python modules in vim
https://github.com/sloria/vim-ped
python vim
Last synced: 16 days ago
JSON representation
:athletic_shoe: Quickly open Python modules in vim
- Host: GitHub
- URL: https://github.com/sloria/vim-ped
- Owner: sloria
- Created: 2015-09-09T01:13:15.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-10T05:13:38.000Z (about 9 years ago)
- Last Synced: 2024-10-04T17:00:59.067Z (about 1 month ago)
- Topics: python, vim
- Language: VimL
- Homepage:
- Size: 137 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ped.vim
Quickly open Python modules based on Python import paths.
This is particularly useful for viewing/editing third-party packages in a virtual environment.
## Quickstart
```vim
:Ped
```### Examples
```vim
:Ped django.shortcuts
:Ped django.views.generic.TemplateView" Partial matches work, too
:Ped django.views.generic.Templ
```## Installation
Requires the [ped](https://pypi.python.org/pypi/ped) Python package (installable with `pip`).
```bash
$ pip install -U ped
```Then add this plugin using your favorite plugin manager.
Using [vim-plug](https://github.com/junegunn/vim-plug):
```vim
" ~/.vimrc
Plug 'sloria/vim-ped'
```
## Defining mappings- `PedPrompt`: Shortcut to input `:Ped ` in the command line.
- `PedVword`: Input `:Ped pkg` in the command line, where "pkg" is the current visual selection.
- `PedVwordExec`: Like `PedVword`, but executes immediately.
- `PedCword`: Input `:Ped pkg` in the command line, where "pkg" is the current word under the cursor.
- `PedCwordExec`: Like `PedCword`, but executes immediately.### Example mappings
```vim
nmap e PedPrompt
nmap E PedCwordExec
vmap e PedVwordExec
```## Configuration
```vim
" Vim command to open files, defaults to 'edit'
" Examples: 'tabedit', 'split', 'vsplit'
let g:ped_edit_command = 'edit'" ped executable, defaults to 'ped'
let g:ped_executable = 'ped'
```## License
[MIT Licensed](http://sloria.mit-license.org).