News for hackers. Stuff that matters.
Re:Vim After 11 Years by Aardwolf on Tuesday February 19, 2013 @12:28PM (#5245621)
Can vim do the following?

I'm editing some project with 10000 C++ files.

There is some C++ file I currently don't have open, say "palette.cpp" which is in a subdirectory "project/graphics/algorithms/color/".

Now I want to open palette.cpp without ever having to type, not even with tab autocompletion, that path.

IntelliJ (which I do use for C++ ;)) can do this easily: just press CTRL+R, then palette.cpp, ENTER, and there you are in that file.

Another thing: Some IDE's and editors have this feature where if you change lines, it marks it with some color on the left, as well as colors in the scrollbar, to immediately see which parts of the file were changed compared to git and/or the last time you opened it. Can Vim do this?

Thanks!

Re:Vim After 11 Years by SeoxyS on Tuesday February 19, 2013 @12:32PM (#5245640)
The CtrlP plugin will make opening these files a breeze. If you just trigger it and type palette.cpp, it should be the first match.
Re:Vim After 11 Years by Symmetry on Tuesday February 19, 2013 @04:16PM (#5247092)
Better, you can type palete.cpp and it should still be the first match.
Re:Vim After 11 Years by tomsthumb on Tuesday February 19, 2013 @02:31PM (#5246495)
with your cursor on a filename that is a legitimate relative path, you can just press 'gf' to open the file from command mode. there is also a mirrored command of '^xf' in insert mode. slightly different work flow...

^o and ^i get used a lot in conjunction with 'gf', and are also pretty handy in general.

Re:Vim After 11 Years by johncoltrane on Tuesday February 19, 2013 @12:33PM (#5245653)
1. It is done like this:

    :e **/palette.cpp<CR>
2. You can try http://www.vim.org/scripts/script.php?script_id=3052 but I'm positive there are other implementations.
Re:Vim After 11 Years by manaskarekar on Tuesday February 19, 2013 @12:33PM (#5245646)
It seems "find" will do you what you need. Source: http://stackoverflow.com/a/3407288

Not sure if this helps but FuzzyFinder: http://www.vim.org/scripts/script.php?script_id=1984

Source: http://stackoverflow.com/a/573097

Re:Vim After 11 Years by reyan on Tuesday February 19, 2013 @02:11PM (#5246363)
CtrlP takes care of that. Ctrl+P and then Ctrl+F (cycle to buffers list—you can also map this to anything you want) and it will list buffers with a + next to the buffers with local edits. Ctrl+D and it will change from full path to file name search. You can cycle between buffers, files, mru files and even more (tags, etc.) with extensions.
Re:Vim After 11 Years by fphilipe on Wednesday February 20, 2013 @02:55AM (#5249426)
I've mapped Ctrl+T to open CtrlP in tag mode.
Re:Vim After 11 Years by jlgreco on Tuesday February 19, 2013 @12:38PM (#5245692)
I do a large amount of my developing in vimdiff which, coupled with version control, does what you ask.
Re:Vim After 11 Years by airblade on Wednesday February 20, 2013 @06:28AM (#5249863)
> Some IDE's and editors have this feature where if you change lines, it marks it with some color on the left, as well as colors in the scrollbar, to immediately see which parts of the file were changed compared to git and/or the last time you opened it.

This does that: https://github.com/airblade/vim-gitgutter

Re:Vim After 11 Years by jablan on Tuesday February 19, 2013 @12:43PM (#5245723)
> if you change lines, it marks it with some color on the left

This is the feature that I miss the most in Vim, after working 5+ years in IDEs like Visual Studio. There are some Vim plugins addressing this (at least a year or so ago, when I searched), but nothing as elegant and seamless as in IDEs.

Re:Vim After 11 Years by wfn on Tuesday February 19, 2013 @12:35PM (#5245669)
Most of the things of such kind are available as vim plugins (for the 'open file without path' thing, see e.g. http://www.vim.org/scripts/script.php?script_id=858) - you can then remap those new commands to keys/shortcuts.
Re:Vim After 11 Years by shuzchen on Tuesday February 19, 2013 @01:46PM (#5246194)
re: git changes, after seeing such a plugin for sublime (https://github.com/jisaacks/GitGutter) I went ahead and implemented the same thing for Vim (https://bitbucket.org/sirpengi/iwilldiffer). The plugin is still in beta status yet with compatibility, and I should make it easier to install with the various plugin managers as well as make the feature async (right now, the UI blocks waiting on the diff command). But otherwise, I'm using it daily and it supports mercurial as well as git.
Re:Vim After 11 Years by zer on Tuesday February 19, 2013 @03:19PM (#5246803)
> IntelliJ (which I do use for C++ ;))

If I may ask, how do you use it? The C/C++ plugin was unusable, last time I tried it.

Re:Vim After 11 Years by Aardwolf on Tuesday February 19, 2013 @04:55PM (#5247310)
The C++ plugin is totally unusable and I uninstalled it immediately after trying.

But I just made a manual set of syntax highlighting rules for C++, and that's good enough for me.

The git integration and other IntelliJ features make up for the missing C++ navigation and refactoring features for me.

I do everything related to compiling, debugging, and stuff (as well as all git committing and stuff, the IntelliJ git integration is about showing changed lines) from a terminal.

Re:Vim After 11 Years by mzs on Tuesday February 19, 2013 @05:31PM (#5247541)
I have vim as my EDITOR, then cscope does this and more.
Re:Vim After 11 Years by njharman on Tuesday February 19, 2013 @04:35PM (#5247204)
Yes.