eclim autoimport removing current line - vim

Eclim by default automagically imports java classes when they aren't imported yet. It used to do this successfully, but now the import happens and the line I am currently editing gets deleted.
My hypothesis is that there is some conflicting plugin running at the same time. Whats a good way to figure that out? I tried looking at vim verbose output (via verbosefile) but I am not sure what to look for. Thanks!

Looks like this was just fixed in the source code, you could try patching in this change and rebuilding eclim from source (or waiting for the next release):
https://github.com/ervandew/eclim/pull/529

Related

How to setup with vim YCM

i want to move from using CMake to Premake for my current project, but im usig vim and the YCM plugin which is really great for making my setup like an IDE. However, the plugin needs compilation flags file which is produced when running CMake. Is there something for Premake to generate a file like that as well?
Premake does not do this in its current state (alpha 13). If you have some insights as to what is necessary for getting it to work, the best thing to do would be to submit a ticket in the issue tracker.
I'm afraid, if your new build system does not generate that compilation flags file (yet), you'll need to maintain your own (hand-crafted) one. You can find an example at https://github.com/Valloric/ycmd/blob/0e999dbee209ea79a522259816ce3a68b7d6cddc/examples/.ycm_extra_conf.py.
I would advice to have (at least) one per project rather than one generic one in your $HOME.
Although I have to admit, that it would be beneficial to get it created and in sync with the actual build system, I don't find it too troublesome to maintain it manually. At the end of the day it only contains the C++ standard you want to use, a set of preprocessor symbols and a set of both system and user include directories.

Modify node.js REPL "defaults"?

I'm a node.js beginner. I want to modify the behavior of node's default REPL, as decribed in this link, but I don't want to run a startup script because doing so starts the REPL without importing the existing history file. (I know this because I tried the code from the first answer: the modified REPL started, but prior history wasn't available.)
Is this possible? Or would it be easier to figure out how to add/import the existing history file and add said code to a startup script?
NOTE: I also tried using rlwrap with -H path/to/.node_repl.history, as suggested in this thread, combined with the script from the first link, and still no luck. I get the modified behavior, but no history.
Don;t know if this is the 'right' way to do this, but it works for me:
Adding
alias node='node -e repl.repl.ignoreUndefined=true -i'
to my bashrc achieves the effect I'm looking for without clobbering existing history. I'm not sure how well this will work for changing multiple REPL defaults, so I'm not marking this as an answer yet.
UPDATE
Unfortunately, the latest node.js update broke this. I believe this is the pull request responsible.

TeX-PDF and VIM configuration

I somehow cannot get the TeX-PDF plugin to compile the files appropriately. It states in the plugin description that it defaults ot pdflatex, which I have on my Windows 7, it is mapped in the path variable. It spits out the error:
compiled with errors
which is baically an undefined case (there are no errors in the file, it compiles with pdflatex from the cmd well).
I tried almost all of the solutions for VIM (like vim-latex, atp, etc) but I can't get them to work with pdflatex. I just want to be able to avoid the process in the command line. I need a step by step, or really well explained guide, because I am sick of reading all the manuals from top to bottom, and not having a result.
If you
:set shellcmdflag=/k
any external shell command invoked from Vim will keep the console window open. You'll see the exact command-line that the plugin uses to compile, and can investigate from there what's wrong. Once you've found the problem, you need to "work backwards" to see how you can get the fix into the plugin; maybe there's a setting to influence the compilation. (I don't know / use the plugin myself.)

Problems getting Vim's omnicppcomplete to work right

I'm trying to get OmniCppcomplete to work and I'm running into trouble. I've followed the steps on this page (including the things to add to the .vimrc file). I downloaded and extracted the zip file to ~/.vim, I ran the commands it says, I did everything there and it still doesn't work. I also tried downloading the modified stl for the __STD_NAMESPACE_BEGIN fix. I ran ctags on the directory and placed the tags file in ~/.vim/tags/cpp.
Whenever I type a class name or namespace name followed by a . or :: or whatever, I only get an error saying Omni completion (^O^N^P) Pattern not found. I've run tselect TestClass to see that the tags were actually being generated and they are, so I'm at a loss as to what's happening.
I think I figured it out. I had been placing my tags in a directory called ~/.vim/tags/cpp/, rather than making a file called cpp and placing it in the tags directory. It seems to work now.

A few vim questions

So I was hoping that some old school Vim'ers could help me out. These are all separate questions and normally I would put them up each on their own but I'm not sure if that qualifies as question whoring here.
Plus I think if you know enough to be asking any of these questions they will all be coming up in the near future:
I have a library I'm writing and a series of applications that use that library. There doesn't seem to be an easy way(from what I can tell) to build a ctags file for the library and build one for each of my applications and make sure one references the other when I'm in vim.
Using gf to open files from command mode is awesome, but a lot of my include files
don't contain the full path. They refer to an include directory I set in the IDE. How can I set this directory as another point for Vim to start looking for files?
Is there a way to compile a file inside Vim and send the output to a buffer? I'm currently using MSVS 2k3 but I'll be porting over to Linux in a few weeks so if this is possible on either system I'd appreciate it.
Re 3)
If you put a makefile in your root dir, you can simply write
:make
This will run make and (iirc) put any errors into a seperate buffer, and make vim goto the first compile error. From there you can navigate all erroring lines using :next-error
Also, see this page
http://wiki.beyondunreal.com/Legacy:Vim
and
http://linux.byexamples.com/archives/287/perform-grep-and-make-in-vim/
for details on how to show the result in a seperate console.
1- tags files are independent, and can be used together. See :h 'tags'
I can't tell what is the easy way to build tags files. I have one that consists in using two plugins of mine:
one (draft) plugin that knows how to update C++ tags files (it should be easy to adapt it to other filetypes),
and another (local_vimrc) that helps me define directories-local .vimrc. Thus for any files within a given directory hierarchy, I can adapt the &tags options to use the relevant tag files, and the current tag file that will be rebuilt automatically (or when a keybinding is triggered). (Plugins like project should do the trick as well)
2- :h 'path'
3- :h :make
HTH.
2)
:cd {path}
For help:
:he cd
A few others like :lcd might be better suited. Just scroll down that help page.
This is rather off topic, but might still be useful: if you're using Visual Studio a lot and like Vim, you might want to look at ViEmu. It's the best Vim-emulation for any IDE I've yet seen, and the cost is really low. :) And no, I'm not getting a commission. :P
It's not obvious, but if you open a directory instead of a file, it's nicely browseable.
e.g.
:e . (colon-e-dot)
:e .. (colon-e-dot-dot)
will let you browse from your current directory or its parent.
(understanding that you were probably hoping for a capability to have vim accept e.g.
:e abc.txt
and have it look in several directories, which I don't know how to do.)

Resources