Live data from Hacker News

Emacs setup for Python development

caisah.info

51–56 of 56 posts

Re: Emacs setup for Python development

#51

Earlier quoted context omitted.

sed can do in place recursive changes for search patterns. if you use vim search and replace across a file it's pretty much the same.

I was thinking of something more context aware than a simple find/replace. If you're changing MyClass.getFoo() to MyClass.getBar(), you only want to do that on instances of MyClass.

If there is a plugin for intelligent refactoring in vim, I have yet to see it. You can use tabdo or buffdo for multiple files, but the class/object parsing isn't there.

Re: Emacs setup for Python development

#52
post #41

Earlier quoted context omitted.

Vim and Emacs have had decades to get to that point. ST is a comparative baby. I'd love to see a modern editor that isn't designed around a terminal join those ranks.

There is Acme for Plan9 [1] and it has inspired a few other editors. I don't use them myself because they don't have syntax highlighting. [1]: demo at http://www.youtube.com/watch?v=dP1xVpMPn8M

That looks awesome. Having used the WMII window manager it looks quite familiar. Even then the learning curve seems steep.

Re: Emacs setup for Python development

#53

Earlier quoted context omitted.

Can you give a specific example of how being "fully programmable" improves your workflow?

I can give a few, but I also think it's something that needs to be experienced to really "get it". At work I have to use a proprietary version control and build system (don't ask), and it was relatively easy to hook it into Emacs. We also have an internal website with a cross referenced, hyperlinked version of the code. I have a function to launch a browser and go to the cross reference site for the symbol under the…

In the end, personal taste is what counts. All of these you mentioned can be done in Sublime Text as well.

I used emacs for 2 years, than switched to Sublime Text 2. All of the shortcuts I use is available via emacs package, and due to it's extensive API, I can add the functionality I want, with python, my favourite language.

Emacs is much more extensible than Sublime Text for sure. On the other hand, Sublime Text's extensibility is enough for my needs.

Re: Emacs setup for Python development

#54

Earlier quoted context omitted.

Can you give a specific example of how being "fully programmable" improves your workflow?

I can give a few, but I also think it's something that needs to be experienced to really "get it". At work I have to use a proprietary version control and build system (don't ask), and it was relatively easy to hook it into Emacs. We also have an internal website with a cross referenced, hyperlinked version of the code. I have a function to launch a browser and go to the cross reference site for the symbol under the…

Mind sharing your config?

Re: Emacs setup for Python development

#55
I've attempted something similar but without installing any external package and by documenting the config inline so that one could pick only what needed:

http://giuliofidente.com/2013/04/getting-to-know-and-use-ema...

In there I tried to address also other issues like saving the backup files out of the working dir, show the line numbers, highlight long lines.

Re: Emacs setup for Python development

#56

Can someone link a vim setup for python, for comparison puposes, perhaps with a short feature comparison? I'm currently a vim user with a fairly basic setup (I tried st 2 but couldn't figure it out for managing my work flow) , but I find the idea of emacs attractive.

I've got a vim setup hosted on github: https://github.com/srathbun/vim-plugins

It has Klen's python-mode plugin as a submodule: https://github.com/klen/python-mode

Python-mode provides awesome sause :) To get the repo, clone it recursively, or you won't have all the submodules. `git clone --recursive https://github.com/srathbun/vim-plugins.git ~/.vim`

Post reply on HN