Is Vim editor very smart?

is vim worth learning
vim vs vscode
why learn vim
vim tutorial
should i learn vim
vim vs ide

I am programming in C++ or Java. So I want to use Vim editor, because it is very flexible. I have heard that I can configure the Vim editor to be able to go

  1. from object to the definition
  2. from function to the definition
  3. from class name to the definition

Do we have any professional Vim-er that could tell me exactly how to configure Vim for that? Thanks in advance.

P.S. In case readers will consider this question is not connected with programming, I would say that this is improving speed of programming. So it is a help to the programmer. So please don't close this question.

EDIT: Also I would like to know how vim works with code completion and can vim hint the list of methods that are available for the certain object? If yes, then I would like to know how to configure these options too?

What you're looking for is ctags and tags/TAGS files. Ctags (I recommend Exuberant Ctags) is a program which scans source files for identifiers and creates a file indexing them. You can then use ^] to jump to the definition for the tag under the cursor.

There may be some additional details needed to tell vim how to find the tags file; I'm not sure off-hand what they are. But that's the general idea - run ctags over your source code and then use ^].

Alternatively, you may wish to look at GNU Global. It's a bit more sophisticated. But ctags will accomplish what you've described.

Why use Vim: Forget easy-to-use design. Choose something hard , Be smart and use something really hard, like Vim. Editing text is not the kind of thing that seems like it would involve a highly difficult program. Vim Editor is very smart? Ask Question Asked 10 years, 9 months ago. Active 8 years ago. Viewed 551 times 5. 2. I am programming in C++ or Java. I want to use the Vim

Vim is without a shadow of a doubt, the best editor in the world (Come get me emacs guys). Flame wars aside, what I have found incredibly useful for both C++ and Java programming is eclipse (best IDE in the world, yes now I am poking Netbeans) with the vrapper plugin. You get all the benefits of a fully integrated development environment and the power of vim keyboard shortcuts.

Vrapper doesn't give you full vim emulation but you can bounce around your code using vim shortcuts and you don't loose any of the goodness of eclipse.

Why I use Vim, In this article I talk about why Vim is my primary editor of choice. Developers are lazy and very clever at the same time. We're able to� Vim is a popular open-source command-line text editor. It is very popular among users because it supports a lot of options. To perform a smart search in Vim, use

Using ctags is definitely the place to start, but don't forget cscope. In both cases, you first have cscope and ctags scan your source files and create their databases before you start vim. You also need to occasionally refresh the databases as your code grows and changes.

With ctags, simply use the command "ctags" in your code directory. If you have a heirarchy of directories, start at the top and use "ctags -R" to recurse through all the directories below. Start vim in the same directory as the resulting tags file and vim should find and load it automatically. When in the editor with the cursor on a function or variable name, you can type '^]' and vim should jump to the definition.

Similarly, with cscope, use "cscope -b" or "cscope -b -R" to get more detailed tag information. Vim and cscope work together to give you much more information such as where an identifier is used and from where a function is called. There is a set of macros that can be used to access the information. You can find the macros and their meanings in the vim cscope help information.

Vim won't make you a more productive developer - DEV, We, as developers, spend a lot of our time on our text editor of choice. Choosing So, what's your stance on the general push for vim? Posted on It have everything i need: Terminal, Split windows, Smart autocompleteetc. vim is an excellent very powerful editor that can handle documents of 100.000 lines and more. hint: vim does not have PER DEFAULT access to system clipboard (for whatever reason not enabled per default) two options: install gvim; recompile vim

Last time I checked, a long while ago, ctags was okay, but it missed some identifiers, and cscope had a more exhaustive search option, but it still missed some identifiers.

grep is what I prefer. It's exhaustive but still pretty fast if the source code base is a reasonable size or the PC is fast. You can invoke it from vim with :grep. Here's a simplified version of my own _vimrc to show how I have it configured. I put comments to explain what keys do what.

" for Windows, replace with the location of `grep.exe'
" not needed for Unix/Linux
:set grepprg=c:\prog\cygwin\bin\grep.exe\ -n\ $*\ /dev/null

:function! RecursiveSearchIdentifierUnderCursor()
:   sp
:   let grep_cmd = "silent grep -r \"\\<" . expand("<cword>") . "\\>\" *"
:   exe grep_cmd

" CTRL-backslash to search for the identifier (or "word") under the cursor
" an identifier is in the form "xxx_123_yyy" but something in the form
" "xxx_123_yyy.aaa_999" would be two identifiers separated by a period
" this basically executes:
"       :grep -r "\<identifier\>" *
" for whatever `identifier' the cursor happens to be over
" to close the newly opened window, use:
"       :q
:map <C-\> :call RecursiveSearchIdentifierUnderCursor()<CR>

" cursor up/down to move to the previous/next search result
:map <Up> :cp<CR>zz
:map <Down> :cn<CR>zz

" jump up/down between horizontally split windows
:map <PageUp> <C-W>k
:map <PageDown> <C-W>j

" move to the previous/next enclosing brace
:map <Left> [{
:map <Right> ]}

" move to the previous/next enclosing parenthesis
:map <Home> [(
:map <End> ])

" move to the previous/next enclosing # preprocessor directive
:map <Insert> [#
:map <Del> ]#

Also, don't forget * (SHIFT-8) and # (SHIFT-3) to search forwards and backwards for the current identifier under the cursor within the current file. I've found these invaluable when jumping around through code, especially when searching for short variable names like 'i' and 'j' that would otherwise match parts of other variable names in a blind search in a conventional text editor.

You can also invoke :make from vim if you like to use make. It will stop on the first compilation error, then you can edit and start the build again from inside vim.

Once you get comfortable defining your own functions and key mappings, there are lots of ways to make repetitive programming tasks easier with vim.

Why I love Vim: It's the lesser-known features that make it so amazing, You might have just heard that Linux distributions ship with a default command- line text editor called Vim, and may want to just give it a try. So� Vim editor supports all these modes. Later sections of this tutorial describe these modes. Stevie Stevie editor was developed for Atari ST platform. It was released in 1987 it is an abbreviation for ST Editor for VI enthusiastic. It was very simple and provided only very small subset of the original Vi editor.

Code-completion in vim is available as vim-scripts:

Vim is the worst editor, I've even been asking my smart vim friends for help. other text editors because they do so many editing tasks so poorly in comparsion to Vim. Almost all Linux distributions, even older versions, come with the Vim editor installed. Vim stands for Vi Improved, meaning that Vim is a modified and improved version of the old Vi text editor. Pros: Vim supports automatic commands, digraph inputs (useful in programming), split and session screens, tabs, colored schemes (color-coded by

What is Vim and Why use Vim?. First, a disclaimer: I'm, by no means , Core to Vim's belief is that most people spend more time editing existing This is also a pretty cool aspect of Vim, which is that it's everywhere. Vim - the ubiquitous text editor Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple OS X. Vim is rock stable and is continuously being developed to become even better. Among its features are: persistent, multi-level undo tree

VI and VIM editor: Tutorial and advanced features, VI and VIM Linux editor tutorial of advanced editing features and tricks. This tutorial covers This is very similar in operation to the Microsoft Windows editor, "Notepad". (Other Unix set shiftwidth=4. Intelligent auto-indent: set smartindent

22 Best Linux Text Editors For Coding {2020 Reviews}, Looking the best powerful feature-rich Linux text editor for your coding needs. When you master the commands, Vim is very efficient. Pros: Atom has color- coded syntax, a smart autocomplete feature, multiple panes, and a�

  • To telll vim where the tags file are, use the tags option. Type ":help 'tags'" in vim for details.
  • It's actually for varying values of "world" but I see your point!
  • With version 7.0 and up you can auto-complete names and lines of code in insert mode using keystroke combinations like ctrl-P, ctrl-N, and ctrl-X-ctrl-L. The online help has all the details.
  • vim 7.2 supports floating point numbers, so there's no need for a calculator :)
  • Intriguing. I simply cannot guess what an editor needs floating point numbers for, so perhaps this is just a step more towards having an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp?