• Stars
    star
    396
  • Rank 108,213 (Top 3 %)
  • Language
    Vim Script
  • Created almost 16 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

on the fly Python checking in Vim with PyFlakes

WARNING: DEPRECATED! pyflakes-vim is officially deprecated!

The features of pyflakes-vim have been merged into other more widely-used and updated tools.

If you're using vim 8.0 or neovim, try ALE and flakes8 instead.

On older vims you can try Syntastic.

pyflakes-vim

A Vim plugin for checking Python code on the fly.

PyFlakes catches common Python errors like mistyping a variable name or accessing a local before it is bound, and also gives warnings for things like unused imports.

pyflakes-vim uses the output from PyFlakes to highlight errors in your code. To locate errors quickly, use quickfix commands like :cc.

Make sure to check vim.org for the latest updates.

Quick Installation

  1. Make sure your .vimrc has:

    filetype on            " enables filetype detection
    filetype plugin on     " enables filetype specific plugins
    
  2. Download the latest release.

  3. If you're using pathogen, unzip the contents of pyflakes-vim.zip into its own bundle directory, i.e. into ~/.vim/bundle/pyflakes-vim/.

    Otherwise unzip pyflakes.vim and the pyflakes directory into ~/.vim/ftplugin/python (or somewhere similar on your runtime path that will be sourced for Python files).

Test

Some tiny tests with:

pip install -r test-requirements.txt
py.test ftplugin/python/test_flaker.py

Running from source

If you're running pyflakes-vim "from source," you'll need the PyFlakes library on your PYTHONPATH somewhere. (It is included in the vim.org zipfile.) I recommend getting the github.com/pyflakes PyFlakes fork, which retains column number information, giving more specific error locations.

Hacking

git clone --recursive git://github.com/kevinw/pyflakes-vim.git

or use the PyFlakes submodule:

git clone git://github.com/kevinw/pyflakes-vim.git
cd pyflakes-vim
git submodule init
git submodule update

Options

Set this option in your vimrc file to disable quickfix support:

let g:pyflakes_use_quickfix = 0

The value is set to 1 by default.

Pyflakes can use Python 2 or Python 3 compiled into Vim. If you have both, you can ask Pyflakes to prefer one or the other, with this in your vimrc:

let g:pyflakes_prefer_python_version = 3

or:

let g:pyflakes_prefer_python_version = 2

Pyflakes will chose Python 2 by default, if you have both. If you prefer a version that you don't have, Pyflakes will quietly fall back to the version that you do have.

TODO

  • signs support (show warning and error icons to left of the buffer area)
  • configuration variables
  • parse or intercept useful output from the warnings module

Changelog

Please see http://www.vim.org/scripts/script.php?script_id=2441 for a history of all changes.

More Repositories

1

pyflakes

a faster smurfier pyflakes fork using _ast instead of compiler
Python
178
star
2

GodotVision

Godot in RealityKit / visionOS
Swift
116
star
3

GodotVisionExample

Example template for GodotVision
GDScript
96
star
4

gitviz

Visualize git repository internals as they change, live, in the browser.
JavaScript
61
star
5

pylua

minimal prototype for the basis of a python to lua translator
Python
26
star
6

raylib-jai

Jai bindings for Raylib
C
22
star
7

fakeartist

live video pixel sorting your webcam since 2014
C++
17
star
8

uCodeEditor

Unity editor code for editing code with syntax highlighting
C#
14
star
9

trackpadtouch

Reads multitouch input from your trackpad, giving it to your Unity game with an interface matching Input.touches.
Objective-C
11
star
10

vim

my vim scripts
Vim Script
7
star
11

UnityShaderRewriterExample

Unity shader rewriting proof-of-concept/example
C#
7
star
12

jai-shooter

GLSL
6
star
13

kevinw.github.com

my website
JavaScript
5
star
14

jai-imgui

C
5
star
15

odin-playground

trying odin (https://odin.handmade.network/) for gamedev
C++
3
star
16

decentralized-tech-research

3
star
17

raymarching-toolkit

HTML
2
star
18

tractools

trac vim tools
Python
2
star
19

jai_d3d11_example

Direct3D minimal Jai example
HLSL
2
star
20

sipext

sip/bakefile builder
Python
2
star
21

funhouse

7DRL 2013 game
CoffeeScript
2
star
22

LiveMaterial

update the text of Unity shaders live, even in standalone builds
C
2
star
23

chickencoup

C#
2
star
24

jaitro

A minimal libretro frontend with support for multiple cores running simulatanously.
C
2
star
25

games-in-typescript-talk

slides about making games in TypeScript
HTML
2
star
26

encasa

A personalized homepage. Shows your Todo.txt tasks and the modification times of files you deem "important."
Rust
2
star
27

mesh-conductor

C#
1
star
28

web2d

An experimental WebGL 2D engine written in CoffeeScript.
CoffeeScript
1
star
29

everylastmodel

Tweeting every last model on the internet.
JavaScript
1
star
30

vocabattack

JavaScript
1
star
31

todoit

Show the first unfinished todo.txt item always on top.
C++
1
star
32

jai-macro-challenges

1
star
33

zig-wasm-game

C
1
star
34

odin_bugs

1
star
35

vimoogle

google tools for vim
Vim Script
1
star