what is the proper coding to add python-mode plugin to _vimrc - python-3.x

Would someone be kind enough to show me what exact code is needed in the _vimrc file to get the Python-mode plugin to work! Thanks! (I also read that it is out-dated) is the Jedi plugin that much better? Thanks from the VIM newbie!!!
Bob

You won't be lucky if you expect a single command in your virmrc. Turning vim into a python ide is a collection of multiple plugins you can either manage by hand or use a plugin manager like vundle. Best practice is to use your configuration along with a repository hosted for example on github using git. You can use mercurial or baazar just as well.
Walking through one of the numerous tutorials on the net will be your only chance.
For example here: https://github.com/mbrochh/vim-as-a-python-ide along with the video:
https://www.youtube.com/watch?v=YhqsjUUHj6g

Related

Change buffers in FakeVim

Does anyone know some shortcuts for FakeVim to change between files?
Is it possible to use buffers in Fake Vim? I accidentally found out that Ctrl+w,w gets you the next window. Does anyone know other? For example getting to the left, right, top, bottom windows?(vim's Ctrl+w,l and others)? Is there any documentation on FakeVim? Is it possible to configure FakeVim's vimrc file to create shortcuts for changing between buffers and the Projects view?
Thanks!
Recently I've been doing most of the changes on FakeVim plugin.
You can find list of Vim commands supported by FakeVim at https://github.com/hluk/FakeVim (recent version from Git master branch).
I'm still not sure how to document the features in Qt Creator. I'll probably implement something like :help <command> in near future.
The FakeVim documentation is severely lacking. This paragraph, for example, is so fuzzy it's borderline irresponsible:
In the FakeVim mode, most keystrokes in the main editor will be intercepted and interpreted in a way that resembles Vim. Documentation for Vim is not included in Qt Creator. For more information on using Vim, see Documentation on the Vim web site.
Basically, without a proper documentation or a look at the editor's source code it's impossible to know what should work, what shouldn't and in which way the behavior of what works deviates from Vim's behavior. And that's what passes for a modern IDE, these days.
Whatever…
I think that your best bet is simply trial and error: since you appear to know how to use Vim you'll have a lot of commands and shortcuts to try.

Adding vim snippets

I have found this resource for Ruby/Rails snippets, seems like it has lots of cool snippets that I could use with vim.
But since I'm new to vim, I don't know how to enable those snippets to my vim editor. There is no instruction manual as such.
How can I get these kind of snippets enabled in the vim editor?
Those snippets are for the snipMate - TextMate-style snippets for Vim plugin. You need to install it first.
Note that though this plugin isn't maintained any more, it's still working fine (and probably will continue to do so, due to Vim's great record of backwards compatibility), and is still used by many people (me included). There's a renewed fork available, though: garbas/vim-snipmate. A newer, more powerful plugin is UltiSnips - The ultimate snippet solution for python enabled Vim, which can convert the old snipMate snippets into its format. So, there's a lot of choice.
About Snippet Plugin in Vim
I recommend the plugin Neosnippets: https://github.com/Shougo/neosnippet This is the best in my opinion.
Step 1: Install plugin. Recommend using Pathogen to install
step 2: Download/clone a snippet repo you like to local machine, or create your own(recommeneded)
Step 3: Set the path of above repo as Neosnippets's snippets folder in vimrc
let g:neosnippet#snippets_directory='~/path/to/above/snippets/'
Step 4: Customize more if you like, according to the help file.
For the repo you mentioned
I checked it.
One problem is it's out of date, many Rails code are several years ago. They are of little use now.
The other problem is the format is not compatible with NeoSnippet. You can check :help neosnippet-snippet-syntax for how to write snippets for NeoSnippets. It's simple while easy to use.

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>.

Is there an Vim/MacVim equivalent for TextMate's Find in Project?

I was using TextMate now I am using MacVim, the only thing I miss from TextMate is the "Find in Project" functionality, is there any Vim plugin providing this functionality?
I think EasyGrep might do most of what you are looking for. It does a extension sensitive search of the current directory on down.
I use it a lot for finding things in projects.
I think Project.vim lets you search in its "project" but I never really liked the idea of having several files from different parts of my filesystem magically grouped in a virtual project.
If — like me — all the files of your project happen to be in the same "real" folder Ack.vim and EasyGrep.vim both work very well.
LustyExplorer is also very good for searching in buffers.
I've been using ack.vim to do this.
You may need to install ack beforehand unless you already have it installed. There are installation instructions on the vim-scripts page, but here's what I did (I don't use macports):
curl http://betterthangrep.com/ack-standalone > /tmp/ack
sudo mv /tmp/ack /usr/local/bin/ack
sudo chmod 0755 /usr/local/bin/ack
Which I have in a setup file for my vim configs here.
I have not used TextMate, but going through their manual, I believe one of these plugins is what you're looking for
NERD tree
Fuzzy finder
Lusty explorer
I personally use NERD tree and Fuzzy finder and they're both phenomenal! Do give them a try.
You could try Waldo.
If you like fuzzyfinder.vim you might want to have a look at Command-T as well.
The Command-T plug-in provides an
extremely fast, intuitive mechanism
for opening files and buffers with a
minimal number of keystrokes. It's
named "Command-T" because it is
inspired by the "Go to File" window
bound to Command-T in TextMate.
Here you can view some screencasts with demos of the plugin.

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