I used eric for python IDE before, but it was not very good. I also tried to use Vim to add some plug-ins for python IDE, which is not very good, it is estimated that this is the way the user sees or uses the product for the first time, causing some difficulties for the user, and it is very likely that the user will lose interest in this product. Of course, I am not saying that eric and vim are not good. On the contrary, they all have many supporters who use them to write Python, and I usually use Vim when writing C or Shell. Later, when I wrote Python, I used Eclipse and added a Pydev plug-in to write Python. It took about half a year to get started.
Pydev has just been set up in the past few days to make it more personalized and efficient. Now, it is easy to set it again next time.
1. Set the tab size: As mentioned in the previous article, let's talk about it here. Window -- preference -- Pydev -- Editor, you can see the setting of the Tab length. In addition, there is an option in the row below it, "Replace tabs with spaces when typing ?", If you select it, there will be no tab in the new source file, but it will be replaced by X spaces.
2. setting of automatic comments starting with module: window -- preference -- Pydev -- Editor-Templates. I chose to set the name to "<Empty>, and the table is "on. The value is as follows:
View Code PYTHON
1234567
'''Created on ${date} @author: Jay Ren@module: ${module}'''${cursor}
3. print settings (because I use python3, so print (): The setting is also in templates, select "print" as name, and set it: print ${space_if_py2 }$ {lparen_if_py3 }$ {cursor }$ {rparen_if_py3} and select its automatically insert.
4. Automatic Completion settings: Customize the window -- preference -- Pydev -- Editor-Code Completion settings.
After setting, a simple result is as follows:
View Code PYTHON
1234567891011
'''Created on 2011-12-7 @author: Jay Ren@module: just_for_fun'''def just_for_fun():print('just for fun')if __name__ == '__main__':just_for_fun()