I wanted to gather some opinions on how others have their setup to code most effectively (in python in particular). I’m currently using atom since I mostly modify simple bash scripts and python. I’ve recently discovered that I can download linters for atom, making it so much easier to see syntax and stylistic errors in my code, but now I’m curious if I’m missing out on anything else. At the recent OHBM OpenScience call (which is a great series), I was able to ask what everyone’s favorite text editor was, and I heard Spyder, which I hadn’t really considered before for my python code. So in addition to potentially switching to Spyder, do others have suggestions on what makes you more productive/efficient at writing code (whether it’s add-ons to text editors, or just using a certain editor, or something I haven’t even considered).
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set smarttab
colorscheme desert
execute pathogen#infect()
syntax on
filetype plugin indent on
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
PyCharm for python development is amazing. It’s not lightweight (I’m still annoyed whenever it starts rechaching the “skeleton” of the packages you’re working on, as it takes a long time), but I feel it makes me much more efficient. Plus it can have vim bindings Some of the features I like and use regularly are
live templates (e.g., I created one to add parser with argparser. I type “parser” then and it automatically expands to 10 lines of code with standard input/output arguments. or another one I use often is pdb to add import pdb; pdb.set_trace())
support for virtualenvs / conda environments
search everywhere (press shift twice and will open up a search bar to search everything everywhere – classes, files, etc.)
easily go to class/function definitions
easily refactor code (from simple renaming of variables to extracting methods, etc…)
If editors matter to you, I’d seriously consider checking out Emacs - even if you’re only interested in Bash and Python for now. As Steve Yegge would say, Emacs has The Quality Without a Name.
Try it, read about it, even if to find out that you don’t like it.