How do I add a project manager to Vim? - vim

Thanks for letting me know I can change my posts this way. I am actually done with adding the project manager to my liking but now I am trying to ad snipmate to my plugins now entirely sure how though.

The project plugin needs a project file in your $HOME directory called .vimproject. A sample entry could be as follows on Windows (if you're using linux, replace vimfileswith .vim):
VIMSTUFF="~/vimfiles" CD=. flags=r {
../_vimrc
../_gvimrc
plugin/my_plugin.vim
after/syntax/c.vim
}
This project holds all my vim related files that I created such as my_plugin.vim and after/syntax/c.vim.
To edit the .vimprojects file, open up vim and press F12 which will toggle the project window.
The documentation of the project plugin provides a few samples that will guide you how to start.

Related

Possible to use Aptana standalone with vim with Mac?

I've just started doing Ruby on Rails development.
I'm trying to get the best of both worlds. I love getting around a file with just the keyboard like I can with vim. But opening up and find the files from the command line is a drag.
I'd love to be able to click a file open in Aptana and then be able to navigate around it with vim commands to do my actual editing.
I haven't been able to find any definitive solution for getting this working on a mac. I tried installing software for it with Aptana under Help >> Install new software as linked to from here: http://satyavvd.blogspot.com/2010/05/aptana-studio-with-vi-emulation.html but the link is 2 years old I couldn't figure out how to get it running.
Has anybody out there gotten this to work?
I'm using Aptana 3.2.2
You know you can right click on a file and choose which editor to use, do you? Or assign any editor -- internal or external -- to any filetype in Aptana's preferences?
Aptana is based on Eclipse so all the Vi(m) plugins that work in one are probably going to work in the other.
Take a look at these five plugins:
Vrapper
A "regular" Eclipse editor with many Vi(m) key-bindings.
viPlugin
Idem, payware.
Viable
Idem, payware.
vimplugin
Run Vim inside of Eclipse/Aptana. I don't think that it works on a Mac.
eclim
Eclipse and Vim talking through a server.
But if you only want a more convenient way to open files in Vim I can't recommand CtrlP enough. You could also try the similar but different FuzzyFinder, LustyExplorer or Command-T) or you could get more familiar with Vim's :e **/foo<Tab>.

VIM NERDTree shortcuts to open standard Rails folders

I have just made the switch from Textmate to MacVim and so far I am loving it! My workflow is just becoming a breeze… and I'm kinda hooked on that.
As front-end developer working on Rails projects I find that I am constantly opening up the same folders in the projects (app/assets/javascripts|stylesheets & app/views & specs).
I was wondering if there was a way to set shortcuts to open up these folders in NerdTree? I've looked into Bookmarks but these seem absolute paths - I'd like default relative paths for all the Rails projects I work on. Is this possible?
Thanks,
Ad
There is no default way to do this in NERDTree. It is probably possible, but it would require a custom script to do what you're describing. I'm sure you can get help developing that if you look for it, but I'm betting it will be hard to find something that already does this.
You can, however, check out https://github.com/tpope/vim-rails/, which as far as I know is the de facto standard for Rails development in Vim. It'll probably cut down on your need to use NERDTree to navigate files at all, because you can jump through related files quickly with other commands.
As romaini mentioned, bookmarks are also very handy. Make a bookmark for the top-level of a Rails project, open something, use vim-rails techniques to navigate related files, you'll get what you need.
Did you try the project plugin?
NERDTree stores bookmarks in a very simple file. Creating one such file for every project and pointing NERDtree to it may solve the problem.

"Registering" GVim in Windows XP

This is probably bordering off-topic-ness here, but not a lot of people on SuperUser use GVim, as opposed to here, so I'm leaving it here.
The problem is simple - I'm using GVim 7.3. from vim.org, downloaded it in the form of archived binaries (the two archive files) like always and replaced the older version. However, I can't get Windows to recognize it and to associate a file extension to it.
From windows explorer go to, let's say, .py file, Open with ... / Browse / gvim.exe in its directory and ... nothing. Like it never happened.
Does anyone have any idea what could be causing this behaviour? It's mighty annoying to have to open every file from within Vim manually.
I think the default installer ("self-installing executable") from vim.org lets you register shell associations; this means you get an entry "open with vim" in every context menu from the explorer. Did you not use this file?
I'm looking at this page and I'm thinking about this download.
This doesn't answer your question, but it's a different way to edit with gvim from the context menu.
Create a .reg file with the contents below (adjusting your path to gvim.exe) and execute it. Then whenever you right-click on a file in explorer you will have an "Open with GVIM" option.
REGEDIT4
[HKEY_CLASSES_ROOT\Unknown\shell]
#="Open with GVIM"
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell]
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with &GVim]
#="Open with GVIM"
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with &GVim\command]
#="C:\\Vim\\gvim.exe \"%1\""
I gave up trying all kinds of tricks through the registry, but this solution works for me just fine. I might add, I'm having the same issue on Windows 7. Since Windows seems to be able to do the association with vim.exe just fine, and this is apparently tied to the file name, I moved vim.exe off as say vim.ex$ and made a copy of gvim.exe to vim.exe. Cheap and easy way around this goofy problem, and I can't say I ever use vim.exe on purpose.

VIM VTreeExplorer plugin (IDE style browsing for VIM)

I've looked at a number of the IDE style file explorer / management plugins for VIM. The most popular one seems to be Project, but I've never got on well with it. Specifically, having to always create a .project file for the files you want to browse, and that changes to that file hierarchy outside of VIM are not picked up.
I stumbled across the VTreeExplorer plugin and I really like the way it works. I'm trying to work out how I can make it work in a more IDE style way, for instance, to always open vertically down the full length of my window, and once I've opened a file from it, it automatically hides the VTreeExplorer buffer again? Also, ideally it wouldn't show up when I use :bn or a buffer explorer to tab through each file buffer.
Any recommendations would be appreciated. Thanks!
What about NERDTree? It is really good, one of the best file tree plugin for vim available.

Vim as Visual Studio IDE

I have spent lot of time doing research on VIM. I am Windows guy since last 6 yrs and was using VS.
Now started working on Linux. I want to make VIM as close as possible to VS.
I want features like
Project Navigation
Files in Different Tabs
Search in Project
AutoCompletion
I have found plugins for the above requirements
Project Pligin
MiniExplore
Taglist
OmniComplete
I am not able to correctly set vimrc script.
When I try to open file from Project it gets open in different tabs.I want to get it open in different buffers.
Also when I want to close file in buffer , complete window gets closed.
Open taglist and project window makes all mess.
Has any one done settings with these plugin..
Could you guys please post your vimrc files??
It will save lot of time for newbies like me..
Vim is a very different tool than Visual Studio. Plugins may help you get certain bits of functionality you desire, but do not expect them to work exactly like VS, work well together, or even work at all.
If you are looking for a programming environment more like Visual Studio, there are many good graphical IDE's you can use such as NetBeans, Eclipse, Code::Blocks, KDevelop, Anjuta, etc. Some of these tools are, IMHO, better heavyweight IDE's than Visual Studio, and all are available on Linux for free.
You should either learn to use Vim the way it was built to be used, or find a different tool that suits you better. Shoehorning Vim into a surrogate for Visual Studio will probably cause you more pain than it's worth.
Yes it's different to VS, but that doesn't mean it can't be used in the same way. It's just not as easy to do it :)
Personally I go the other way and use ViEmu to get VS to behave like VIM. But I'm not in the same situation as the author of this question.
Why not have a dig through some uploaded vimrc files on dotfiles.org?
You can use the following script, Trinity.
http://www.vim.org/scripts/script.php?script_id=2347
It will require 3 more scripts, and Vim will look like an IDE.
The TagList at left, a file exporer (NERDTree) at right, and Source Explorer at bottom.
Also, you can find some very useful blog entries at
http://kevin-berridge.blogspot.com/search/label/vim
The author, Kevin, explains how to compile solutions form inside Vim. He also shows interfacing and jumping between them which is very useful too.
Furhermore, there is the script vim-visual-studio which can be found at
http://code.google.com/p/vim-visual-studio/
This script is using Python extension. I have Python 2.5 installed in Windows. I am using Gvim 7.2 which is compiled with Python 2.4. So, I have replaced the executables of Gvim as explained here:
http://www.gooli.org/blog/gvim-72-with-python-2526-support-windows-binaries/
So, Gvim became compatible with Python 2.5 and raised no problems. Also, a menu entry "Visual Studio" has appeared as expected. It connects to Visual Studio itself, and it works perfectly. It does not just compiles a file, it can compile a solution containing more than one project as in Visual Studio. You can even use the Vim's 'quickfix' feature. Hope this helps.
If you really want to have vim as the front end, try Eclim. It uses Eclipse as a backend daemon for code completion and project management, and vim as the interface.
If you only like vim because of the vi key bindings, but want it to be more IDE like, you could try the latest MonoDevelop that has it built in.
These plugins used to exist long before vim had tabs. I'd be quite surprised there isn't a way to tune these plugins to split windows instead of opening tabs.
Now I can't help you much as I don't use these specific plugins but other ones. You should look at their help (:h project, :h taglist, etc)
PS: in vim terminology (it will help you browse the help files), what you call "buffer" is actually called "window", while a "buffer" is just the text you are working on, it may be associated to a file, or not. For a given buffer, there may be no or several window displaying parts of the buffer.
you can give a try to eXvim
http://code.google.com/p/exvim/

Resources