Turn vim into Source Insight

An earlier article on ctags and cscope may be a good starting point for the current one.

Source Insight is a very popular code editor cum browser on Windows and can be used on Linux over Wine as well. However, the same can be done using vim with some practice. The Trinity plugin for vim does it all. Trinity makes 3 more plugins work in unison to deliver you an IDE like experience. You can have the similar look and feel and functionality of Source Insight over vim at a reduced number of CPU cycles. And when using remotely… heaven!

Transform vim into the most powerful and lightweight IDE you ever used!

Features

  • Automatic Display of Declarations in the Context Window on the bottom in the (G)VIM window using the Source Explorer plugin
  • Symbol Windows For Each File on the left in the (G)VIM window (G)VIM using the Taglist plugin
  • Quick Access to All Files on the right in the (G)VIM window using the NERD Tree plugin

Installation

  • Download the latest version of Trinity
    $ git clone https://github.com/wesleyche/Trinity.git
  • Copy the trinity.vim and NERD_tree.vim files under plugin directory into the vim plugin directory e.g. ~/.vim/plugin

Configuration

Add the keybinds for the 3 plugins to your ~/.vimrc

" Open and close all the three plugins on the same time
nmap    :TrinityToggleAll

" Open and close the srcexpl.vim separately
nmap    :TrinityToggleSourceExplorer

" Open and close the taglist.vim separately
nmap   :TrinityToggleTagList

" Open and close the NERD_tree.vim separately
nmap   :TrinityToggleNERDTree

Webpage: Trinity

Some more useful tips:

2 thoughts on “Turn vim into Source Insight”

Leave a Reply

Your email address will not be published. Required fields are marked *