Or, no, you don’t need to use a graphical IDE to develop code, as TFA states.
Thank you for coming to my Ted talk.
EDIT: Don't believe me that VIM is an IDE? Read the threads for elucidation. :)
Or, no, you don’t need to use a graphical IDE to develop code, as TFA states.
Thank you for coming to my Ted talk.
EDIT: Don't believe me that VIM is an IDE? Read the threads for elucidation. :)
If "by default", you mean "with the default vim configuration", then this assertion is wrong.
Vim does have a definition-search" feature, but it needs hand-made configuration for each language, and since it relies on regexp instead of parsing the language, it's useless outside of micro projects.
To enable real code completion and navigation, vim needs plugins and external tools. The modern way is to use one of the LSP implementations for vim (I've tried ALE and CoC), but that's clearly not "out of the box" for vim.
Code completion, syntax highlighting, goto definition, goto tags... these are all core functions of VIM. Addons just help it work with languages other than C.
That’s cool, but if you already use Neovim for other things, there’s a Free Pascal Language Server Protocol (LSP) server for it too [1]. You’ll many of the same features that Lazarus has, like code completion, diagnostics, etc. In fact, it’s the same LSP that’s available for VS Code [2] and it uses Lazarus as a backend.
Too much is being made about how hard Neovim is to configure; if you’re new to it or to Lua, just use LSP Zero [3] that takes care of all of the details of installing LSP, linters, etc.
[1]: https://github.com/neovim/nvim-lspconfig/blob/master/doc/ser...
Sorry. Yes, (n)vi(m) is great and useful and all, but it’s not an IDE.
E492: Not an editor command: gd
VIM 8.2
Do I have to activate it somehow? :)
int foo ()
{
return 3;
}
int bar()
{
return foo();
}
put your cursor somewhere on the "foo" identifier in the second to last line and type "gD" (without the quotes). It should jump to the definition of foo. It's not perfect but works for much code without crazy preprocessor stuff. By default it's file-local, but you can give vim a list of include files to search as well.Specifically it's one of the 'g' commands (like gg which goes to the top of the file and gG goes to the bottom). Just put your cursor on an identifier and gD (goto definition is the mnenomic).
:help g
C doesn't have a defined directory structure, and a lot of the source/header files you'd use are stored in places like /usr/lib and such.
Vim works perfectly fine with multiple files out of the box, it just wants a tag file for jumping between multiple files and letting autocomplete work with those tags.
This is hardly unique to vim (and emacs) - you can't work on a project in IntelliJ without first setting up a workspace and letting IntelliJ index all those files. The only difference is how the index is generated.
Oh, and `:help cscope` (again, thanks aidenn0). In vim >=9.0 a tagging tool is now incorporated into the base vim install.
ctags was just the first example of many things I can refer to.
For example any basic C IDE on a default install is expected to have debugging integration, project management, among other stuff.
Granted I don't think vim is an IDE, but you'd demonstrate that better by pointing to the IDE stuff it doesn't do (like debugging, I think, but I debug with printf and only rarely fire up gdb so for all I know it does support it).
> Vim defaults to being a C IDE, no plugins required
And you can get Neovim with all batteries included: https://github.com/rockerBOO/awesome-neovim#preconfigured-co...