6 ms·
> a text editor whose interface was already far behind the state of the art when I started school? And what exactly is this state of the art you talk about? If
by irahul 15y ago
> a text editor whose interface was already far behind the state of the art when I started school?
And what exactly is this state of the art you talk about? If it's the IDEs you are talking about, saying that they suck at text editing will be an understatement. Code completion, refactoring support etc isn't text editing.
When I am using a language which requires a lot of boilerplate and demands an IDE, I go for some plugin which gives me vim keybindings(eclim for java, don't do much C#).
Code is text at the end of the day, and something which isn't good at munging text isn't going to be my code editor. Eclipse, Visual Studio are both good tools, but they aren't good at munging text, not at all. And the boilerplate code they generate doesn't do anything to mitigate this.
> So why, exactly, should I voluntarily use a text editor
Because it isn't a pain in the ass like the IDEs when it comes to text editing.
- davidw 15y ago> And what exactly is this state of the art you talk about? Oh, that's easy: Emacs :-)
- CJefferson 15y agoYes, but vim doesn't do code completion or have refactoring support, which is something I like in my IDE. Before someone tells me it does, I've had competent vim users try to get C++ support set up for me before, and it is almost worse than useless in code completion, code refactoring, and even trivial things like "jump to compiler error/warning".
- veyron 15y agovim does do code completion ... For example, in my gvim, control-p shows the autocomplete list.
- CJefferson 15y agoDoes it work with the boost headers? Or member functions? Eclipse and VS can handle these both with ease. If you think it does, I'd be interested to know your setup, as I've never been able to get such a thing to work effectively in vim.
- burgerbrain 15y ago- Complete namespaces, classes, structs and union members. - Complete inherited members for classes and structs (single and multiple inheritance). - Complete attribute members eg: myObject->_child->_child etc... - Complete type returned by a function eg: myObject->get()->_child. - Complete the "this" pointer. - Complete a typedef. - Complete the current scope (global and class scope). - Complete an object after a cast (C and C++ cast). - Complete anonymous types (eg: struct {int a; int b;}g_Var; g_Var.???). It also works for a typedef of an anonymous type. http://www.vim.org/scripts/script.php?script_id=1520 http://www.vim.org/scripts/script.php?script_id=1520 (disclaimer: I don't use it, I turn off completion everywhere I go.)
- uxp 15y agoClang_Complete is another completion plugin, though it is not compatible with OmniCppComplete. http://www.vim.org/scripts/script.php?script_id=3302 http://www.vim.org/scripts/script.php?script_id=3302
- CJefferson 15y agoThanks for the suggestion, but it uses ctags, which simply chokes on boost.
- burgerbrain 15y agoTry uxp's suggestion then, which doesn't use ctags.
- calloc 15y agoI use clang_complete on Mac OS X and it is a dream. It works without issues on the Boost libraries and overall is very fast and efficient.
- exDM69 15y agoBoth of these tasks are highly language specific. I guess your IDE can do it for your language but can it do it for Python/Haskell/Lisp/whatever? In Vim, these features tend to be plugins. Vim ships with some of these plugins by default (e.g. C and C++). Autocompletion with C and C++ works using cscope and ctags, which also are very powerful code navigation tools. There are plenty of other tools available. Vim has excellent "jump to compiler error/warning" support called the quickfix list. Just invoke your compiler using :make (you can configure what it does, by default it runs make) and look at the errors in :copen, browse with :cnext/prev. All your arguments against Vim were false. Please don't spread such BS that can scare new people away from Vim.
- CJefferson 15y agoI feel that at least telling them they are in for a hard slog, is a good idea. I've wasted at least a couple of months, using vim as my standard editor, before giving up and going to something else. Vim's "jump to compiler error" tends to get confused by C++, and gets very confused by clang (this is from experience). There are indeed a huge number of tools available, for code navigation, for C and C++ in vim. Each of them has it's own faults and none of them have anywhere near the functionality of eclipse (although last time I tried vim, clang_complete didn't exist, and might now outperform tools from last time I tried).