I've been using vi/vim since '97 for various quick edits and
administration tasks, but have only recently considered using it to
replace Netbeans as my ruby editor of choice. One thing I find
extremely useful in both Netbeans and Eclipse is the Ctrl+Click "Go to
definition" feature, where you can ctrl+click on a class or method and
it will take you to the definition.
Now, I've played with exuberant ctags and rails.vim, and it's close,
but no cigar. Here's what I want: by default in Netbeans and Eclipse,
you can ctrl+click a local method or class in your local rails
project, but you can also ctrl+click on things defined in gems or in
the system libraries that are coded in Ruby. Netbeans for example
parses all ruby files in the default system paths and makes them
navigable for you. If there are multiple files that define a method,
it will present you with a list and allow you to choose between them.
How can one accomplish this within vim? If it can be done, I may be
able to make the jump full time.
You can use multiple tag files in Vim as follows:
:set tags=./tags,c:/ruby/lib/tags
Using g] will give you options for multiple entries found.
Related
I want to write a simple editor with basic autocomplete functionality for the Go language as a pet project. How would one go about doing it? I took a look at the Go plugins for Eclipse and IntelliJ, but they were too big for me to comprehend (not to mention getting one to compile).
The Go standard library offers the building blocks for a Go parser which
you can use to parse the source files and look for function definitions and the like.
There's also the godoc command which
already does what you want: extracting method definitions and it's documentation. You may look in the
source code to see how godoc is
working or use godoc directly.
This editor written in Go projects has a manageable amount of code,
you may look into it.
The de facto standard approach to this problem is to use nsf's gocode. I have tried it only in Vim - it works very well.
Even though there's ready made support for specific editors, gocode is not editor specific. It's a daemon with a communication protocol. It is thus usable from any program.
I have a Windows Installer XML (WiX 3.5) project and five localization files for my installer. Therefore WiX creates five .msi files, for every language one. How can i put all in one .msi and let the user select the language when executing the installer?
I heard something about a bootstrapper, but then i would have a Setup.exe and i need a msi file. Is it not possible to adabt the localization strings after compiling with WiX?
This can be done using transforms. Please take a look at this article:
http://www.installsite.org/pages/en/msi/articles/embeddedlang/
There are 2 parts to making this happen,
localisation of the Installer UI, and/or
choice of installed files.
The method I chose will automatically select the local (or near local) language, and can also be forced to a specific transform using command line options. This doesn't prompt the user to choose which language to install in - so maybe it doesn't actually meet your needs.
The second 'installed files' doesn't seem to be documented as well and I was recently asking about it in Why would MST not include files with different content.
As a response provided there is now an ANT build script using Windows7 SDK & antdotnet
I made installer with Inno Setup. It consist of multiple executables all located in Program Files "APP" folder. But for every executable there's different subfolder in this "APP" folder.
Because every executable is different from purpose, I want to create uninstaller where I can choose, which component I want to uninstall (for example Change button in Add/Remove programs). At the moment uninstaller removes all the applications.
One option is to create different installer for every component and then create installer that contains other installers, but this is too weird.
Is it possible to create custom uninstaller with option to select which component I want to uninstall?
What seems that you need is a modify/repair setup option to your application's setup, right?
Take a look in this extension named UninsHs
Note: Searching in Google I've found another newer version in other site, but I am not sure if it is legit.
It is possible to do in the Inno uninstaller but it won't "fit in" with the wizard style, and will require showing your own forms, and cancelling the uninstall when you've removed the bits you want.
An alternative is to use the setup (which is slightly better suited for this) and handle components being ticked and unticked.
Both of these will require fairly extensive [Code] being written though.
I do Ruby on Rails development pretty much exclusively. I currently develop in OS X using TextMate. I have a virtual machine running to emulate as closely as possible the environment my app will be deployed into, and I mount the code on a Samba share into OS X from the VM guest. From there I open with TextMate and code away.
I'm beginning to think that with the proper plugins and time spent learning, I could be much more productive in vim directly on the VM. Right now my TextMate is basically stock, though I do find the ProjectPlus plugin indispensable. What I'm looking for are some suggestions of vim resources and plugins (if that's the right terminology) to closely emulate the features I am unwilling to give up in TextMate. Or at least, compelling reasons why I should be willing to give them up. Here's a short list:
Ability to have a (preferably) collapsible project tree visible either at all times or easily toggle-able.
Ability to see SCM status at a glance, either within this project tree (preferable) or otherwise. (I use git almost exclusively if this makes any difference.)
Being able to view a side-by-side diff from within vim would be great too
Ability to search through the entire project at will (I suppose :stop; grep -nr; fg; would accomplish this, unless there's a better way to do it.)
Code completion, if possible
The NERD Tree plugin gives you a collapsible project tree. Personally, I find that the netrw plugin is more than sufficient, and this usually comes installed with Vim. Whereas the NERD tree feels as though it tries to emulate the behaviour of other IDEs (and TextMate's project drawer), I feel that the netrw plugin does things the Vim way. I suggest you try both out, and see which one you prefer.
The fugitive plugin provides a git interface to Vim (See Vimcasts: parts 1, 2, 3, 4 and 5).
The ack plugin is great for searching an entire project. You'll want to read up on Vim's quickfix list to get the most out of this.
TextMate's word completion is triggered with esc, and shift-esc. In Vim, you get similar autocomplete functionality using ctrl-n and ctrl-p in insert mode. Check :help ins-completion for (much!) more info.
I am running a series of screencasts about learning Vim over at vimcasts.org. My background is with TextMate, but I've been using Vim fulltime for a while now. As I write this, I'm only 6 episodes in, but I do plan on covering each of the points you've raised in future episodes. I'll try and come back to edit this answer with links to the screencasts as they become available.
And snipMate : TextMate-style snippets for Vim
I'm currently in a similar position to you (moving from TextMate to Vim)
One really good resource is this:
http://robots.thoughtbot.com/post/166073596/intro-rails-vim
Good luck with it!
For file navigation is simply love CommandT
This functions very much the same as the beloved commandT function in textmate.
You might want to start with my Ruby/Rails related vimfiles which includes support for rvm and git.
This screencast is great as well http://blip.tv/file/1372096
I do use VIM and i specially like how to rotate from model/view and controller related..
Check out the blog post: From Textmate to VIM for Rails coders.
The comments there may also valuable for you.
All of the other answers plus:
Ability to have a (preferably) collapsible project tree visible either at all times or easily toggle-able.
The project.vim plugin doesn't really work like TextMate's Project drawer but it's close.
With NERDTree, you can setup bookmarks and make it work a little like a project drawer.
:help mkview and :help mksession can help, too.
Ability to see SCM status at a glance, either within this project tree (preferable) or otherwise. (I use git almost exclusively if this makes any difference.)
vcscommand.vim provides the same set of commands for multiple SCMs, it works with Git, SVN, Mercurial…
You can use the aforementioned fugitive plugin to display the Git status in the status line, :help fugitive-statusline.
Being able to view a side-by-side diff from within vim would be great too
fugitive provides the :Gdiff command that does just that.
A recently released plugin called Gitv tries to emulate GitK in Vim. I like it a lot and the author is very responsive. In the tree view, hit <CR> to open a previous commit in another window and D to see a double diff.
Code completion, if possible
There are a few solutions, if you don't need it to be automatic <C-x><C-o>, <C-n> and <C-p> will be more than enough, if you want "autocompletion" you may try these few plugins. My favorite is autocomplpop.
Search an entire project here.
Code completion: Normally done with ctrl-X then ctrl-O while in insert mode.
Git Integration: git.vim
Project Tree: Nerdtree.vim
Good luck
I published an extended post on this topic today, in which I explain how to replicate 100 features from Textmate within VIM. It's the product of a great deal of hours research.
For example I explain:
How to replicate a Project Drawer
How to manage tabs
How to do Rails specific commands (Lets face it: A lot of Textmate users are Rails programmers)
How to do find and replaces
How to do project wide searches
Read Original Article: Textmate To VIM
I'm new to developing in OpenLaszlo, and have tried Eclipse (hoping for decent code completion), but found it far too heavy for my tastes. fell back to using Textmate, but the bundle for OpenLaszlo is terribly out of date.
Any suggestions? or should I just roll up my sleeves and write a new bundle for Textmate?
I personally use SpketIDE as an Eclipse plugin. It has some code completion, good syntax highlighting.
I use VIM for this. The VIM mode that ships with OpenLaszlo recognizes both the XML tags and the embedded JavaScript. Of course, if you're not already a VIM user, it's a big project to dive in.
If you use a texteditor or XML editor with support for XSD schema, you can generate a custom XSD file of your application using this OpenLaszlo Schema Generator tool. The tool uses Ant to generate the schema file, which then can be used by the editor of your choice.
We used Visual Studio. And we used it just as a great XML editor.
I also used Notepad2 because it is very lightweight and has syntax highlighting.
I've been using Notepad++ with the XML language chosen (since Open Laszlo is basically just XML and javascript). Simple, but effective and free.
I wouldn't have added it otherwise, but since its arch-enemy VI(m) was mentioned:
Emacs
is worth listing. :)
Without knowing much about OL, I am pretty sure one of gazillions of modes it has provides some level of support for your editing needs.
I've been developing in OpenLaszlo since 2006. I currently use NotePad++ with .lzx files set to be interpreted as XML files, this allows the code to be highlighted well in different colours for the different parts that make up OpenLaszlo code (XML nodes, JavaScript/AS3, etc.).
You can find NotePad++ at:
http://notepad-plus-plus.org/
it is free.
I just test my application by loading it into a web browser page.