4 ms·
I'm a full-time Vim user. This was my problem when I started with Vim. But then I learned to love GDB and other command-line development tools. At first it see
by obiterdictum 15y ago
I'm a full-time Vim user.
This was my problem when I started with Vim. But then I learned to love GDB and other command-line development tools. At first it seemed a bit archaic to me, a Visual Studio user at the time, but when I got a hang of it, I stopped missing IDE debugging. Now I'm at the point where I feel crippled trying to develop in an IDE (no split windows, to vim-style macros, inefficient use of screen space, constantly have to switch between mouse and keyboard).
For example, GDB can be scripted, so you can repeat debugging sessions, your entire debugging session is printed, so you can always go back and see the history of changed values. It supports pretty-printing STL containers and you can add your own pretty-printers in python.
There are a lot more to these tools than you can discover by poking and trying things like you would with an IDE, they have a steeper learning curve, but I wouldn't dismiss them immediately as a waste of time.
- ericb 15y agoWhat about project-wide find and replace? I have been looking to switch to vim, but I do this fairly often and don't see anything that compares to what a good ide can do in vim (without bash command madness).
- rbright 15y agoTry bufdo, argdo, windo, and tabdo depending on the subset of files you'd like to modify. E.g., to replace "foo" with "bar" in all open buffers: :bufdo %s/foo/bar/g | update Although I wouldn't knock `bash command madness' for this sort of task. :) The Unix shell is pretty much designed for advanced text manipulation across files. E.g., to replace all instances of foo with bar in HTML files, recursively: $ find . -name '*.html' -exec perl -i -lpe 's/foo/bar/g' {} \; vim and the shell are not so far apart and complement each other well, so it pays to understand them both.
- crowsfan85 15y agoI agree. I've also found this perl script handy for recursive find/replace: http://www.neilgunton.com/doc/deep http://www.neilgunton.com/doc/deep $ deep replace "foo" "bar" "*.html"