如何使用Vim / Emacs实现生产力 [英] How to become productive using Vim/Emacs

查看:131
本文介绍了如何使用Vim / Emacs实现生产力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去3年以上我一直是Eclipse用户。我在其中开发Java EE(和Spring),到目前为止,我完成了90%的任务,而无需触摸鼠标。通常我的Eclipse设置如下:




  • Subclipse(或者我使用命令行)

  • m2clipse(Maven Eclipse插件)

  • 数据源资源管理器(处理SQL)



Eclipse的活动(并将其转移到Vim / Emacs)(这是为多模块/多项目/多文件夹源代码):




  • 重构(整个整个开放项目中的重命名方法)

  • 跳到课程实施

  • 搜索所有用法的特定类或方法

  • 通过maven pom.xml更新依赖关系(第三方JAR)

  • 跳转到第三方库实现(maven可以下载source.jar如果本地存储库没有,eclipse将带给我实际的Java代码让我们说,Hibernate实体管理器实现)。

  • 编写并运行unit-test



所有上述活动领带不需要我使用鼠标。有一些活动,我需要使用一些鼠标,如全球搜索文件



最近我一直想要尝试使用虚拟机开发。这里的想法是创建一个准系统虚拟机(假设使用Ubuntu Server),然后开始编码,或者使用Putty / SSH。



我有一个MacBook Pro 13,这将有利于使用VIM / Emacs或任何轻量级编辑器。



有两个主要目标:




  • 移动性(如在,旅行和编码)

  • VM as开发环境



我想使用的工具如下:




  • Linux

  • Ruby,Python,PHP(偶尔甚至可能是Java,但绝对不是Microsoft .NET)

  • 任何RDBMS

  • 任何构建/依赖系统

  • 单元测试框架



您会推荐什么:VIM?Emacs?其他?其他工具如何?Gnu Screen,ctags等。



帮助我建立梦想环境:



谢谢!

解决方案

如果你提出一个涉及vim或emacs的问题,你永远不会得到一个有用的答案,这是一个宗教问题,没有正确的答案!那就是说,你应该清楚使用Vim! ;-)
但是认真的:Vim是更轻巧的,所以它可能更好地套装你所描述的场景。 Vim可以用不同的语言编写,您可以在www.vim.org上找到许多有用的脚本。
Emacs是较重,但Lisp是一个非常强大的脚本语言。所以Emacs是一个通用工具,而不仅仅是一个文本编辑器。 IDE功能(像项目管理)是我不时在Vim中遗漏的东西。有一些脚本要做,但我不喜欢他们。如果需要,我会去Emacs。


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!

解决方案

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.

这篇关于如何使用Vim / Emacs实现生产力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆