Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to become productive using Vim/Emacs [closed]

I've been an Eclipse user for the last 3 years or more. I do Java EE (and Spring) development in it and so far I've done 90% of my tasks without having to touch the mouse. Typically my Eclipse setup is as follow:

  • Subclipse (or alternatively I use command line)
  • m2clipse (Maven Eclipse plugin)
  • Data Source Explorer (dealing with SQL)

The typical Eclipse activities I do (and would like to transfer that to Vim/Emacs) are (this is for multi-module/multi-projects/multi-folder source code):

  • Refactor (rename method throughout the whole "open project")
  • Jump to class implementation
  • Search for all usage of a particular class or method
  • Updating dependencies (3rd party JARs) via maven pom.xml
  • Jump to the 3rd party library implementation (maven can download the source.jar if local repository does not have it, eclipse will bring me to the actual Java code for let say, Hibernate entity manager implementation).
  • Write and run unit-test

All of the above activities would not require me to use mouse. There are a few activities where I would need to use a little bit of mouse such as Global Search file

Lately I've been wanting to try development using VMs. The idea here is to create a barebone VM (let's say to use Ubuntu Server) and start coding there or use Putty/SSH.

I have a MacBook Pro 13" which would benefit of using VIM/Emacs or any lightweight editor.

There are 2 major goals:

  • Mobility (as in, travelling and coding)
  • VM as development environment

Tools I'd like to use are as follow:

  • Linux
  • Ruby, Python, PHP (and occasionally maybe even Java but definitely not Microsoft .NET)
  • Any RDBMS
  • Any build/dependency system
  • Unit-testing framework

What would you recommend: VIM? Emacs? Others? What about other tools? Gnu Screen, ctags, etc.

Help me build my dream environment: lightweight, productive, easily replicable :)

Thanks!

like image 282
xandross Avatar asked Nov 03 '11 20:11

xandross


2 Answers

If you ask a question which involves "vim OR emacs" you will never get an useful answer. It's a religious question, which does not have a correct answer! That said, you should clearly use Vim! ;-) But seriously: Vim is much more lightweight, so it might better suite the scenario you are describing. Vim can be scripted in different languages and you can find many useful scripts at www.vim.org. Emacs is "heavier", but Lisp is a very powerful scripting languages. So Emacs is much more of a general tool than just a text editor. IDE functionality (like project management) is something I'm missing from time to time in Vim. There are some scripts to do that, but I don't like them. If you need that, I would go for Emacs.

like image 149
Achim Avatar answered Sep 20 '22 17:09

Achim


I am an Emacs guy (using vi only to edit configuration files under /etc). I think that with Emacs, you should start it at most daily (and it is very different with vim), and you should configure it in your .emacs file. For example, I compile using the F12 key, with (global-set-key [f12] 'recompile) in my .emacs.

like image 26
Basile Starynkevitch Avatar answered Sep 21 '22 17:09

Basile Starynkevitch