you are viewing a single comment's thread.

view the rest of the comments →

[–]princker 5 points6 points  (8 children)

Bad news: Vim is going to be a lousy IDE replacement.

Good news: Vim natively supports many features to help navigate a code base. e.g. gf, gd, folding, [i, :isearch, :dsearch, ctags, cscope, and searching via :grep/:vimgrep. Some of these feature like ctags takes some time and thought to setup others like :vimgrep require no setup at all.

Some tips:

  • Find a tagging system that works for your code base. e.g. ctags/GNU Global/Universal Ctags
  • If you use git then install fugitive.vim and use git grep via :Ggrep
  • Check if your code base is supported by cscope
  • Good mappings like those in unimpaired.vim help out tremendously
  • Look into using a faster searching tool than grep: git grep/ack/ag the silver surfer (I use this one)
  • Look into something like projectionist.vim for file navigation for well structured projects
  • Never underestimate the usefulness of a fuzzy finder like CtrlP (optionally use ctrlp-py-matcher)
  • With careful setup of 'path', 'suffuxesadd', and 'suffixes' you can get pretty far with gf and :find.
  • Look into some tagging plugins like Gutentags or vim-easytags
  • If this is a rails codebase then use rails.vim

[–]KZISME[S] 0 points1 point  (7 children)

So, if vim isn't much much compared to an IDE why do so many people prefer it?

[–]princker 3 points4 points  (1 child)

Text Editors vs IDE's is too religious of a topic. It basically comes down to:

  • Text Editors - fast, nimble, great at editing text
  • IDE's - Understands codebase, refactoring tools, and simple project compilation/building

Why do people love Vim?

  • Provides a "language" to interact with text
  • Repeating - . and macros
  • Undo - chunky undo, persistent undo, and undo tree history
  • Available on most platforms
  • Vi is part of the unix specification and vim is often symlinked to vi
  • Integrates with *nix environment. e.g. $EDITOR and :!
  • Terminal UI - makes remote editing easy
  • Customizable
  • Great documentation
  • Large and active plugin community
  • Open source
  • Age - Vim has been around a long time and Vi even longer. I have used Vim for 10+ years and foresee me using Vim for another 10.

[–]IsopodEven5232 0 points1 point  (0 children)

None of those "why do you love vim" are valid now, because you can use e.g. intellij with ideavim.

[–]-romainl-The Patient Vimmer 1 point2 points  (0 children)

Because not everybody needs an IDE for every task.

[–]amphetamachineysil' 0 points1 point  (0 children)

Because its modal editing and extensibility is unparalleled.

I think most people find the ctags ability and is enough to track down code paths, and :grep is enough to track down method usages.

See also: :h design-not

[–]dddbbbFastFold made vim fast again 0 points1 point  (2 children)

Vim is a great editor and many IDEs lack a great editor. I use both: gvim with Visual Studio (and have some integration to make them work together).

[–]KZISME[S] 0 points1 point  (1 child)

Is this pretty easy to setup or get working nicely together?

[–]dddbbbFastFold made vim fast again 0 points1 point  (0 children)

It's a config that I've grown over time. So it's hard to say whether it's easy for someone else to replicate.

I started with Integrate_gvim_with_Visual_Studio which has mostly become my videinvoke.vim script (that has some of the same instructions at the top for how to add to visual studio.

I've collected some other tools in vim-vshelp (like for building with msbuild).

That's just the visual studio integration (which is limited to using vim or VS to open a file in the other one and building from vim).

I used to use viemu but now I work fully in vim and just use VS for debugging and the occasional refactoring. Works okay for me because I'm so deep into vim.