Janus upgrade important functionality missing after upgrade - vim

I just upgraded to the newest Janus and there are alot of things that I miss since December 2011 :(
For example when i entered :cd it changed to :ChangeDirectory and after changing the directory the nerdtree also updated. The same thing applies for :e which changes to :Edit
This is not anymore the case with the newest Janus.
Command-T is also not anymore available anymore. What is the easiest way to add Command-T as a plugin?
Greetings from Nepal and Thank you :)

First, what happens to you is the number one reason why using Janus (and other packages for Vim) is a terrible idea.
Instead of controlling your environment your are almost totally dependent on someone else's desiderata: because Janus's author appears to have decided against some of his previous choices and upgrading Janus is an "all or none" affair you are left in the cold with a Vim you don't understand or are not accustomed to.
You don't have to trust me but I assure you that the right way to customize Vim is to start with nothing fancy, do it yourself, little by little, without copying other people's entire vimrcs and try and install the plugins you like by yourself. Because you start from nothing and know what you add you'll never be in that kind of situation.
Second, whenever you upgrade something you owe it to yourself to review the changes before actually performing the upgrade. $ rake is easy, I must admit, but if you had taken a couple of minutes to look at Janus's Github page you would have seen that Command-T is not included anymore and replaced by CtrlP.
Third, Command-T is not and has never been a part of Janus. It's a separate project run by someone else that used to be included as a Git submodule. To install it, you need to download it separately and follow the instructions. Or add it yourself as a submodule.
Four, greetings from France, lucky bastard ;).
EDIT
To answer your comments…
I went through the TM > Vim transition myself. I started by trying to turn Vim into a TM clone but the whole idea was flawed in so many ways. Many of these flaws apply to Janus as well, IMO.
You have too many custom "mac-like" mappings that seem to make your life easier because they don't require you to learn new shortcuts. That's cool until you need to use Vim on a remote server via a terminal emulator which actively blocks many Ctrl- mappings, doesn't make the difference between Ctrl+Shift and Ctrl and don't even register the Cmd key.
If your vimrc is well organised (and it is, more or less, in Janus) your <D-> custom mappings won't be activated when not in MacVim but you'll end up with two sets of custom mappings to learn and maintain! What if Janus's author decides one day that he prefers <leader>x to jump to tab x instead of the current <D-x>/<C-x>? Are you going to unlearn the previous mappings? Are you going to modify Janus's mappings.vim to get the old mappings back?
Why not learn and use Vim's native commands instead? 2gt is easy and will likely work on every Vim you'll ever come across.
You grow accustomed and dependent to too many plugins, some of them not doing much more than native commands or even overlaping each other like the current Buffergator and CtrlP.
Customizing Vim is a great way to learn how to use it. It takes time, maybe, but the win is big.
ENDEDIT

Related

How to manage the plugin managers in VIM?

I know it may sound silly, but I am curious to find out if there is a framework already in place to help VIM users manage their plugin managers.
So, I know that there are plugins like "Vundle", "Pathogen" and "Neobundle" etc. for this purpose. I have been looking in those tools for the last couple of days. And they are great. My question is, are there any higher-level scripts designed to streamline the plugin loading process utilising any of the above mentioned plugin managers.
All the "Bundle Managers" have internal functions provided for unloading and loading plugins, manipulating RTP etc. Just wanted to check before going and starting to write my own vim script.
I am mainly interested in hearing about techniques using "Neobundle". I know that "janus" is doing exactly what I am asking for. It runs it's own functions to create plugin groups and access pathogen functions. So it is a bit like a front-end for pathogen.
A nice case would be:
Let's assume that you have installed plugins "A", "B", "C" and "D" using "Neobundle", however you would like to disable plugin "B" at start-up. But then enable it later. Everytime you will have to go into your .vimrc and comment out (or in) that line which is responsible for loading plugin "B"? or run the "Neobundle" function responsible for unloading that specific plugin?
Is there a more elegant way to do this?
Thanks.
Do you have that many badly written plugins that you need not one but two freaking levels of abstraction for "managing" them?
Anyway, I don't think there is one real "super manager" because there's no such thing as a unified plugin management API in the first place and… the lack of such an API is probably the reason why there are so many variations on the same theme.
Because Pathogen was the first in that series (there are older attempts like the built-in GLVS, yeah, no one knows about it…) and stayed alone for a while, the only thing that seems to be "standard" is the bundle directory. IMO, that would make a weak starting point.
I've seen a few Pathogen frontends attempts in the past, though, so there's a "chance" that progress is coming in this field.
microbe
pandemic
There are others, browse r/vim for an hour and you will find many…
Any modern (i.e. Vim 7.x), well-written plugin should only define its mappings and commands in the plugin script, and load its functionality on-demand via the autoload mechanism. Functionality that is specific to a particular filetype should only apply there via ftplugin scripts.
Unless you do crazy stuff like having the same mappings for two then mutually exclusive plugins, I don't see a need to dynamically enable / disable plugins. Don't make things more complex than they have to be. If you really have two disjunct editing use cases, I'd rather create two separate ~/.vimrc files and aliases to use them.

Vi / Vim for project of more than a few files

I typically use an ide for large projects and vi for small single file scripts temporary files etc.
Lately I have heard of people using vi for larger projects too - actually, quite defensive and particular proud to do so.
I have tried, but i found it very cumbersome. Do any other programmers here use vi for and medium - large projects? If so, are there any tips/tricks you can offer for navigating source, looking at multiple files etc?
I have tried using tmux to see if it made things easier - but it still felt quite cumbersome
There is no magical tool that can make everything perfect. Vim is an editor, and it's pretty good at it, but it's not and will never be an IDE.
There used to be the pida project that made an IDE around vim, for better interaction when using python, but it got abandonned.
There is eclim which is a really neat tool that can use eclipse as a backend IDE accessible in a few keystrokes from within vim, while having all the power of eclipse for tagging, refactoring, debugging etc.. But you have to want running eclipse in background, which is like hiding an elephant under the carpet...
There are many little plugins you may want to use, and I'm pretty sure everyone has his favorite set of plugins, that helps navigate easily in the code and help tagging (like fugitive, nerdtree, etc..)
Finally, there is vim, a shell and that's all. Vim does a lot of things correctly, like navigating in the source, launching compilations and parsing the errors etc.. And for what vim is not good at, you can use your shell, to execute, to do git stuff, to open more vim windows to edit code..
Anyway, there's no perfect answer to your question, and I bet your question will be closed because of being "non constructive".
What do you find cumbersome? What works for you? What doesn't? What kind of feature do you need to be able to work efficiently with multiple files? How many are multiple files anyway?
Some people use Vim for working on quite large projects: the Linux kernel, Firefox, Vim itself… I guess that you need to know Vim pretty well to pull that off but it's all very doable, even without many plugins.
But I tend to think "complexity" rather than "quantity".
When I work with "complex" languages+projects (quotes because it is all very subjective) I'll use a more suited IDE with a Vim-emulation plugin: Flash Builder+Vrapper for Actionscript 3, Eclipse+Vrapper (then) Android Studio+IdeaVim (now) for Android.
When I work with "simple" (quotes, again) languages+projects I'll use Vim: that's any project involving HTML/CSS/JavaScript/PHP, from 3 to 50+ files.
File/buffer navigation
Vim is very good at opening files (which sounds funny), even without plugins. :sp **/foo<Tab>, for example, is quick and easy. :Ex foo/bar as well.
Switching buffers is also very easy, if a bit awkward at first. :bn, :bN and :b <Tab> will get you a long way.
And if you don't like those built-in methods, you can create your own cool mappings or choose from many plugins.
"Semantic" navigation
I like to think about my project in class/method names rather than in file names. With an up-to-date tags file (generated with ctags or some compatible program), :tag foo is a very efficient way to move around, <C-]> jumps to the definition of the tag under the cursor and <C-w>} opens that definition in a small preview window. That's more than enough for my needs.
I don't particularly like them but you can also use TagBar or TagList to have something that resembles the class browser of your IDE.
I'd suggest you make your needs more clear and ask more specific questions or look around on SO. The subjects above are pretty well covered.
Just a few pointers: I like NERDTree and CtrlP for easy/powerful file navigation and splits for keeping several files visable and navigatable at the same time.

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.

notepad++ alternative on centos to code directly on vps that is like nano

This question has been asked few times here and there, but you see all of them seem to have a linux desktop, i don't want a notepad++ alternative for a linux desktop, I want a notepad++ alternative for centos server, and I want it to be like nano not like vi, I don't know vi, so i'm looking for an editor that let me open a file on vps, choose a programming language, and it should correct my coding mistakes, this way I would not waste my time uploading files from windows to the vps, it should be easy to use and small, I don't want to waste my vps resources on an editor
Does such an editor exist?
Edit
#romainl
my vps is from 2host.com, I have centos 5 64 bit VPS E-CLASS, go to there for more info, that's all the info I know.
It's my production vps true, but i asked because i have another vps from chvps.com, the cheapest plan, i have mysite.com and mysite.net, I bought mysite.net, so no one can steal it, so i redirect users from mysite.net to mysite.com, I'm creating a new script for my site so chvps host mysite.net where i do some testing for the new version, like a staging server.
moreover i play with django on alwaysdata.com so I would like to get an editor.
I have seen many people saying that they love vim/vi, i will learn to use vim if you can tell me why vim is more powerful? aren't they all just editors?
To answer your question directly, here are a few CLI editors:
ne
joe
midnight commander's editor
As far as I know they won't show syntax errors as you type or even on save, you won't get any (semi)auto-completion either. All in all these are more powerful than nano but less powerful than NP++ (which I'm not familiar with) and a fortiori vim or emacs.
Anyway, a stock vim, even built with "huge" feature-set won't check the syntax of your PHP files as you type or on save, you'll need a bunch of plugins for that.
I don't know about emacs, but vim can be used in "easy" mode like this: vim -y yourfile.php.
Vim is one of the two best editors out there, learning its basics is not that hard. You probably don't have much time to spend on it right now but, once you do, try it. It rocks.
Can you tell us a bit more about your workflow (server layout, use of a VCS…)? At a glance it looks like you are editing files directly on a production server which is not really recommended.
<EDIT>
About Vim and all the others being just editors.
Yes they all have the same set of basic features: ability to input text, cut, paste, move the cursor… but even these basic features can be implemented in many manners. You say that you want NP++ features in a CLI editor, we can assume that you have tried other editors and ultimately decided to go with it because it worked better for you than the others.
All the CLI editors are different, like their GUI counterparts they shine in one place and lack in another. Because you are a programmer you "need" some advanced features and any editor not having a full fledged search/replace system supporting regex, some sort of auto-completion, macros, ability to build and show errors and so on.
Vim and Emacs both offer these fatures and sooo much more either natively or via plugins. As far as I know they are the only CLI editors really suited for programming so, to be able to work directly on your VPS, and be productive, you don't really have much choice: it's either one or the other.
The first problems you may be facing is the abruptness of the learning path and the weirdness of their "models" but most vim/emacs users will tell you that once its internalized it's hard to come back.
Why Vim (or emacs)?
I don't have a specific selling pitch to serve you. I was an advanced TextMate user, for me it was the best editor and it fitted all my needs but I was a little bored.
Then I stumbled on a Python screencast where everything looked magical to me and I found other screencasts by Dereck Wyatt and others and I was hooked: the way they moved through their code, the way they search/replaced, the omni-completion, the crazy plugins (surround rocks), the freaking motions and text-objects…
I took advantage of a slow week to learn the basics and make/revert a lot of mistakes and now I look at TextMate the same way you'd look at Notepad (not ++).
Here are a bunch of additional vim links for you:
One of the greatest answers here on SO
Coming home to Vim
Vi for smarties
The Physics of VIM
Vim Introduction and Tutorial
Ask HN: Suggestions for mastering vim?
Use Vim Like A Pro
Power Vim Usage
Why, oh WHY, do those #?#! nutheads use vi?
How I boosted my Vim
Ho, I just remembered another CLI editor: diakonos.
</EDIT>
If you asked allready a few times maybe the application you're looking for doesn't exists yet. I have to do the same things like you (edit files on the server, config and scripts) and I do it with jEdit with the langauge specific plugins plus FTP plugin. At least you could give it a try.

Vim: How to set up an efficient autocomplete configuration?

I've been using Vim for a while now and love it, but one thing I've noticed when I use other editors is that I've never really got autocomplete working with much efficiency. I have supertab & snipmate working, I have tags for whatever language I'm using set up, but somehow it seems a little too cumbersome to use all that much, and apart from long method names I typically just avoid autocomplete.
Does anyone have fast, comprehensive autocomplete funcitonality set up in vim? Specifically:
At the moment, I hit "tab" to autocomplete class/method/variable names & generate snippets, but Ctrl+X+O for inbuilt langauge commands. I'd rather press tab for everything.
The ordering doesn't seem to be too intelligent. Very common stuff is often hidden in the middle of a bunch of rarely-used commands.
I've set up autocomplpop to show potential autocompletes as I'm typing, but I have to hit tab twice to accept the first entry. One much rather single-tab it.
So, any tips on setting up an efficient, comprehensive autocomplete configuration in vim? I know this question is a little vague - but if anyone has an overview of how they autocomplete well, and/or a link to a guide, it would be much appreciated.
Just thought I'd come back and mention that I finally found something I like: A customised version of NeoComplCache. Nice auto popup, everything integrated pleasantly into 'tab', and with a bit of customisation plays nice with snippets.
http://www.vim.org/scripts/script.php?script_id=2620
This is very dependant on your working domain. Vim is a text editor with the ability to interface with intelligent text-aware mechanisms.
If you are using java there is eclim, which is the eclipse backend together with a vim plugin for the frontend.
For C or C++ there is the plugin OmniCppComplete
It works by scanning the headers in the paths you have set up in vim (see :h path), and works very well imo.
If you have to press Ctrl-X_Ctrl-O for omnicompleteion, then your supertab config seems a bit broken. It should try omni or filename completion first, and then fall back to word completion.
YouCompleteMe plugin by Valloric is a very decent plugins for autocomplete and suggestion.
It contains support for all the major languages and you can extend the feature with setting up different engine .
it also comes with syntax checker so u don't have to use Syntastic separately
For setup details visit this link
https://github.com/Valloric/YouCompleteMe

Resources