Questions tagged [ide]
Questions about the use of Vim as an integrated development environment for programming
49 questions
1
vote
1
answer
176
views
Simple way to go to definitions
I use this simple approach to jump to definitions in C++, which works fine for me.
In my vimrc:
autocmd BufRead,BufNewFile *.c,*.cpp,*.cc set path+=/Library/Developer/CommandLineTools/usr/include/c++/...
-1
votes
1
answer
218
views
Vi and Vim for Android Studio [closed]
I used to use the Eclipse IDE for Android development under which I used to use a paid software called viPlugin from the web which allowed me to use vim in that IDE.
However, Android developers have ...
1
vote
1
answer
134
views
Is it possible to edit function definition box info with Coc + Vim?
When I am writing php code, I often create a comment before a function. This comment also includes the comments for a parameter. Like this:
/**
* This function finds cheese.
* @param $mix is the ...
-2
votes
0
answers
62
views
Pre-Migration Risk Assessment - Vim to Neovim (5of8) [closed]
(Shared preamble)
With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at Neovim, with possible adaptation as SpaceVim/LunarVim. I am comfortable with Vim, but am looking for a ...
2
votes
1
answer
265
views
Vim workflow for projects on remote machines
I have several projects on several different VMs which I can ssh into. I also have a nice Vim workflow with plugins like fzf and coc.nvim on my local macbook.
I'd like to learn what is the best way to ...
1
vote
1
answer
170
views
Modify syntax highlighting dynamically
Is it possible to write a vim plugin that modifies buffer in real time? As a first step, would it for example be possible to modify syntax highlighting of unused variables as suggested in a similar ...
0
votes
0
answers
235
views
Use vim locally to access GNU R in docker-container
Disclaimer: I posted part of this question here with a focus on how to use Emacs+ESS, but a solution with vim or neovim is also of interest to me.
I'm using Debian Stable (currently Buster) to do my ...
0
votes
2
answers
782
views
Is it possible to make Vim give me suggestions based on the libraries that I have on my system?
Let's say I create a folder called folder on my HOME directory. Let's also say that I enter this folder and create a node.js file called code.js. If I open this file with Visual Studio Code and I ...
0
votes
1
answer
172
views
How to Start vim with splits open
I want IDE-like look when I start vim.
3 columns. Leftmost, at 15% width, file & symbol browser, then 60% width of main editor space and 25% showing debug points and run logs on right most part.
...
0
votes
1
answer
2k
views
Automatically place closing curly brace on new line
Mainstream editors usually place closing curly brace on the new line automatically while entering function bodies and conditional constructs in languages with curly braced syntactic blocks. Vim/Neovim ...
0
votes
2
answers
1k
views
What are the benefits of using Vi or Vim over IDEs and other text editors?
A programmer here.
I use my favourite IntelliJ Idea, Notepad++, occasionally Visual Code as it depends whether I program in Java, React or do some automation and scripting.
There is a huge hype about ...
5
votes
3
answers
2k
views
How to find plugin vimscript function definition?
Assume I am using some plugin function
e.g. For vim-plug, I put this code in my .vimrc at the end
call plug#end()
How to find out where is this function plug#end() is located? from vimrc directly ...
0
votes
2
answers
477
views
Extent and limitations of Vim extension for VS Code [closed]
VS Code is a very popular these days and it has a Vim emulator which seems to have a fairly good reputation.
See:
Vim extension page at VS Code marketplace
GitHub source for the above extension
...
1
vote
1
answer
202
views
Compile program in same tmux window
I'm new to vim and I'm trying to setup my environment for c++ development, and I want to configure vim in a way that like vscode, if I push f5 key, It would compile the program in the existing tmux ...
6
votes
1
answer
3k
views
IDE-like inline diff highlighting in Vim
I enjoy using Vim and like it better than IDEs on most points. One common IDE feature that I miss, though, is inline diff highlighting:
In this example changed lines are highlighted in blue and ...
1
vote
3
answers
966
views
How to detect IntelliJ/IdeaVim in vimrc?
I have some plugins I would prefer load by default in the terminal, and cause performance issues or UX glitches in Jetbrains' IDEs running IdeaVim. How can I detect IntelliJ IDEs in Vim?
I have used ...
3
votes
2
answers
9k
views
How to set a shortcut to run make in Vim and show the output
I'd like to run make and display the output when I press Ctrl+m in Vim. I know how to run make and display the output while in command mode, thanks to this StackOverflow answer, namely with:
:make | ...
1
vote
0
answers
757
views
IDE-alike Find Usages
I use exuberant ctags to find definitions of classes, methods and the like. Which packages find the usages of a specific tag? A git grep does not work for me as the result is way to big; many method ...
1
vote
1
answer
3k
views
comprehensive list of keys bindings for IdeaVim (PhpStorm vim emulator) [closed]
I’m looking for comprehensive list of keys bindings for IdeaVim (vim emulator for PhpStorm and stuff like that). It looks like this plugin has lots of useful key binding which don’t exist in vim and ...
3
votes
3
answers
1k
views
Test python function from within editor
I am writing python 3 code from within vim.
There is a function within my file like this:
def seconds_to_text(seconds):
return str(datetime.timedelta(seconds=seconds))
Is there a way for me to ...
4
votes
1
answer
2k
views
Function argument editing
I've been using paredit.vim for editing Clojure files. It's quite successful in managing all those parentheses in a sane way. I'm looking for a similar way for editing function calls in other ...
11
votes
3
answers
8k
views
What is the best way to re-factor a variable name in vim?
I know there is one way to search and replace variable occurrences across a source file.
But is there any better way by which if I rename a variable at one place it gets renamed at other places as ...
3
votes
2
answers
2k
views
How to set up a Build > Make > Run cycle for a C++ project?
I am trying to come up with a way to handle C++ projects with Vim. I have sorted out syntax and code completion etc. to some extend. Now, I am curios to hear about how people handle their Build > Make ...
1
vote
0
answers
3k
views
Vim setup for Python 3 [closed]
I want to turn VIM into my Python 3 development environment. What is the best .vimrc configuration and what are good Plug-ins for the job?
1
vote
1
answer
262
views
vim plugins for improved workflow - any like this? [closed]
Are there any plugins to check code quality real-time when programming in vim? similar to tools like ReSharper(I imagine, I have only seen them used and never tried them myself) I would be interested ...
4
votes
1
answer
1k
views
Integration (or emulation) of Vim with NetBeans or Eclipse
Notice:
I hope this question fits our site, I'm open to any comments.
I've been a Vim user for 15 years now, always as an editor on its own, with some IDE functionalities such as autocompletion among ...
2
votes
0
answers
334
views
Tools for working with C #ifdef preprocessor directives?
I want to work with a C code with a lot of #ifdef directives. I wonder if there is a program, that will show me, which of these #ifdef's will be left in the code, and which will be cut out by ...
12
votes
2
answers
5k
views
How to avoid to press ENTER twice, when compiling with :make inside Vim?
I love to use Vim as simple IDE when compiling C/C++ programs (let say with gcc on a Linux terminal), just inside Vim with command:
:w | make | cw
In that way:
the :w vim command save editing
the :...
5
votes
0
answers
2k
views
Plugin for debugging c/c++/fortran in Vim
I was wondering if anyone know a good (modern) plugin, similar to vdebug, that gives a debugging interface for C/C++/Fortran in Vim.
I know about clewn and pyclewn, however, I find these are too ...
-2
votes
1
answer
1k
views
Is vim suitable for professional development inside a company? [closed]
How commonly is Vim used in professional software development today, inside a company? By Vim, I mean the actual Vim editor, not a Vim/vi plugin/setting or usage within Eclipse.
Has Vim hindered your ...
2
votes
3
answers
164
views
Plugin for on-the-fly # => evaluation
How can I evaluate Ruby code on-the-fly when you are writing it?
This is what it looks like:
5 + 5 # => 10
11
votes
3
answers
4k
views
How can I interact with a SQLite or MySQL database?
This might be more suitable for IDE, not for Vim, but still I would appreciate if there was a way that would allow me to connect to either local or remote MySQL/SQLite databases. Is there such a way ...
4
votes
1
answer
525
views
How can I navigate to a class interface?
I've been using PHP Storm IDE for some time and I want to try out Vim. PHP Storm automatically allowed me to jump to classess/interfaces defined somewhere in my code (by use and implements statements, ...
4
votes
1
answer
408
views
Customize vim to automatically check function name against its prototype
I wonder if there is any method that I can use to check a function name against its prototype, which may help a lot when I make typo.
For example, I once wrote a function prototype this way:void ...
11
votes
1
answer
5k
views
Argument completion for python
Is there a way to get argument completion for python?
I am currently using a combination of ctags, python-mode and YouCompleteMe, but I am missing a function to autocomplete the arguments of a ...
10
votes
2
answers
872
views
Navigating code projects without using external commands
I am trying to gather a toolbox of Vim commands/queries, in command or search mode, for navigating a code-base without using Ctags or other external tools. Ctags are great but support can vary ...
3
votes
1
answer
687
views
Is there a way to hook ctag changes to git branch checkouts and pulls?
When I checkout different branches, I sometimes notice that files in the repo are not available to Vim plugins that search based on the ctags index.
I don't have a definitive test that's shown the ...
69
votes
5
answers
52k
views
How can I integrate gdb with Vim?
Instead of gdbtui or ctrl+x under gdb which shows source code on top of the screen I would like to see this in my Vim editor that would jump between tabs, and buffers accordingly.
How can I do this?
19
votes
4
answers
29k
views
Can I jump to a function declaration or definition in a multiple C++ source files project?
Can I jump to a function declaration or definition in a multiple C++ source files project?
Lets say I have a header file foo.hpp:
int bar();
and a source file foo.cpp:
#include "foo.hpp"
int bar() ...
6
votes
1
answer
501
views
equalprg to use for Python
Python is whitespace dependent, and it can't be totally autoindented for that reason, but there are a lot of extra stuff that should be possible to do automatically to comply with PEP8.
Things like ...
11
votes
2
answers
6k
views
Folding fails: vim can't find any fold
I'm trying to fold some PHP code, and I have included a cut-down version of some of the code I'm trying to fold at the end of the post.
I've tried the following vim commands, but only the ex commands ...
12
votes
2
answers
2k
views
Automatically creating functions out of function prototypes from header files
Intro
When programming in C and C++ you usually split your function prototypes and actual functions into a .h/.hpp and .c/.cpp file. Sadly it's very tedious to transfer the function prototypes from ...
0
votes
2
answers
2k
views
How can I comment code with a command in Vim [duplicate]
In various editors one can mark a block of code and with a shortcut, comment it right away. Is there a possible way to do it in Vim without an extra plugin? If not, which plugin or script would you ...
47
votes
7
answers
19k
views
Re-indenting badly indented code
I like the smart-indent feature of Vim, it allows me to create well-indented code blocks.
I regularly copy/paste code in to buffers, but that code is often poorly formatted.
What would be ideal is ...
26
votes
3
answers
36k
views
How can I automatically indent on new lines?
I work on projects with varying levels of indentation. In many of these projects, because of how the files are typically structured, most lines are indented at least two levels (such as methods in ...
9
votes
2
answers
309
views
How can I get correct autocompletion for ambiguous file extensions?
I'm editing Prolog files as part of an exploratory project, and some of the files I'm working with have the extension .pl, which is shared by Perl files. Whenever I do work on a Prolog file named [...
9
votes
4
answers
434
views
Restricting operations to a section of code
There is many times in my day to day work life that I need to operate on a specific function, things like highlighting or searching for a variable, but I have never managed to limit the scope of the ...
48
votes
3
answers
81k
views
How to get intelligent C++ auto-completion?
Some editors (such as Visual Studio on windows) do C++ autocompletion which understand C++. For example, given:
#include <vector>
int main(void) {
std::vector<int> v;
v.i
In Visual ...
73
votes
7
answers
116k
views
Is it possible to have vim auto-complete function names, variables, etc. when using it to program?
Many IDEs automatically complete function names, variables, method names, etc. as the user types. The best ones complete the names based both on the language's built-in library as well as what has ...