I really love geany because its light weight and fast for writing python codes but I really hate how it handles indentation. When I send pyton code to vte **send selection to terminal** some times it throws **IndentationError: unexpected indent**. A simple example would be this function.
``` def load_data(mode='train'): mnist=input_data.read_data_sets("MNIST/",one_hot=True) if mode=='train': x_train,y_train,x_valid,y_valid=mnist.train.images, mnist.train.labels,mnist.validation.images, mnist.validation.labels return x_train,y_train,x_valid,y_valid elif=='test': x_test,y_test=mnist.test.images, mnist.test.labels return x_test,y_test ```
This error occurs everywhere were I write multi-line indents and mostly happens with codes copied from elsewhere. Because of this I always have to use a second ide to correct these problems.
**`View->Show Whitespace`** and **`View->Show Indentation Guides`** helps to see your Indentation Errors, and **`Document->Replace Tabs With Spaces`** helps to fix them when pasting in random code. Also make sure **`Document->Indent Type`** is set to `Spaces` and **`Document->Indent Width`** is set to 4 (or whatever you use).
This isn't so much a Geany issue as a an issue with Python's annoying whitespace semantics.
I read somewhere that geany devs are planning for a python-ide plugin which meant to solve this kind of problem in geany. Any idea about this.
geany devs are planning for a python-ide plugin
Its been suggested more than once, but I'm not aware of anybody working on it.
Note it doesn't have to be Geany devs to make a plugin.
Closed because making a plugin isn't a Geany actionable and the question is answered.
Closed #2098.
github-comments@lists.geany.org