Live data from Hacker News

Finding your way in vim: tags, cscope, grep and more

stolowski.blogspot.com

31–34 of 34 posts

Re: Finding your way in vim: tags, cscope, grep and more

#31
post #27
post #6

I find VIM so difficult to get my head around. Emacs seems to make more sense.. is there any point in trying to grok VIM?

Wow. I've been down-voted for asking a question. EDIT: Please, keep going if you really feel that vindictive.

I assume it's because your original question, vi/vim vs. emacs is a decades old flamebait question, and it probably seems unlikely to some people that anyone could become a proficient emacs user and end up on Hacker News without ever encountering at least the jokes about vim vs emacs holy wars.

Re: Finding your way in vim: tags, cscope, grep and more

#32
post #8

Earlier quoted context omitted.

I made a script that opens all the files I need. I call the script with: :source scriptname. Only problem is that the script works only if I open vim with 'vim' and not with 'sudo vim' (by the way, why is that?). Based on what you've said, I'm not sure if this is an sudo issue or a vim issue. Where is scriptname, and where are the files that scriptname references? Your sudoers may be set up to replace the environment…

It might be worth running :cd in the sudo vim instance and in the regular one. Your sudo current directory could well be different to your own which would explain vim not being able to find the script.

That was the reason. Cleaver to think of that.

Re: Finding your way in vim: tags, cscope, grep and more

#33

Earlier quoted context omitted.

For C and C++, clang_complete gives pretty good completion. https://github.com/Rip-Rip/clang_complete

I like where this is going, but it was a bit unstable for my taste last I tried it. I think it still relies on the file being syntactically correct, which may break your parsing sometimes and is still quite slow with template-heavy code (Boost mostly). Is it still the case? I'd also like some more build system integration hooks (e.g. provide project-specific include dirs and CXXFLAGS on a per-file basis).

You can provide your own flags to the compiler, in the g:clang_user_options variable. It does still break in uncompilable code but I don't quite see how that's a problem. It forces you to be more disciplined. If you're finding it a bit slow, the help files do explain you how to set up precompiled headers with it. I haven't tried that though, so I can't comment on how much it helps. Personally, the only times a get annoyed with it are when I type 'catch (...', and it thinks I want it's help.

Re: Finding your way in vim: tags, cscope, grep and more

#34
post #27

Earlier quoted context omitted.

Wow. I've been down-voted for asking a question. EDIT: Please, keep going if you really feel that vindictive.

I assume it's because your original question, vi/vim vs. emacs is a decades old flamebait question, and it probably seems unlikely to some people that anyone could become a proficient emacs user and end up on Hacker News without ever encountering at least the jokes about vim vs emacs holy wars.

I increasingly see posts on HN about vim, rather than emacs. I like emacs, but wonder whether it's worth trying to use vim instead of emacs. I honestly couldn't give a damn whether some nerds like to get their knickers in a twist re. which editor is best.
Post reply on HN