UsingVim: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Imported from Redmine)
 
(deprecated in GR 3.8)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= Using VIM for GNU Radio development =
== <b>NOTE:</b> This tutorial has been deprecated in GR 3.8. ==


The VIM text editor is a popular choice among coders. If you're using VIM, this page might have some advice on how to optimize your workflow.<br />
The VIM text editor is a popular choice among coders. If you're using VIM, this page might have some advice on how to optimize your workflow.<br />
Line 19: Line 19:


<pre>src = gr.vector_so</pre>
<pre>src = gr.vector_so</pre>
</code><br />
 
then hit Ctrl-Space and it will autocomplete that for you, give a function definition while you're typing etc.
then hit Ctrl-Space and it will autocomplete that for you, give a function definition while you're typing etc.


* [https://github.com/scrooloose/syntastic Syntastic] - Static syntax checker
* [https://github.com/scrooloose/syntastic Syntastic] - Static syntax checker
* [https://github.com/tpope/vim-fugitive Fugitive] - Git integration
* [https://github.com/tpope/vim-fugitive Fugitive] - Git integration

Latest revision as of 12:45, 25 May 2020

NOTE: This tutorial has been deprecated in GR 3.8.

The VIM text editor is a popular choice among coders. If you're using VIM, this page might have some advice on how to optimize your workflow.
This is no introduction to Vim!

The grproject plugin

Available from github .

This plugin is a small extension that gives Vim some idea about the code structure. Say you're editing a GNU Radio block and call :make -- in most cases nothing will happen, because you have to be in the build-directory of your module. grproject.vim tweaks paths around such that in most cases, the right thing happens. Using this plugin will allow to :cn, gf, :make and other things and Vim will more often than not actually find the relevant files.

Other useful 3rd-party plugins

Of course, there are hundreds of nice and useful Vim plugins. Here are a few which help specifically when writing C++ and Python code:

  • Pathogen - If you're not using this already, you should. It organizes plugins.
  • Jedi-vim - This plugin provides smart autocompletion for Python scripts. E.g., you can type
src = gr.vector_so

then hit Ctrl-Space and it will autocomplete that for you, give a function definition while you're typing etc.