[/vc_column_text][vc_tour][vc_tab title=”The simply process ” tab_id=”1393808649-1-44″][vc_column_text]Use the above chart as an example, The box surrounded by red is the main part of the configured vim.
At he top of the line is browser buffer for the editing of many source file.
Browser buffer can visually see which file we opened and switch to the file which we want to edit.
The two red box on the left column, the smaller above is file browser,
we can view the file under the current project and can view other directories and open some file just like a normal file browser.
The lager below is browser tag, tag file is one of index file.
The person who use Source insight under window environment will know that it is very helpful for us to know the
whole code to jump straight to see some definition of a variable or function. We could achieve the jumper if we have the tags file generated by the vim plug-in ctags.
Right is the main body of vim, he shows the current edit text content.[/vc_column_text][/vc_tab][vc_tab title=”Install and initial configurate vim” tab_id=”1393808649-2-24″][vc_column_text]The vim carried by pcDuino can’t right use the Backspace and direction keys because the ubuntu carried by pcDuino is the vim-ting version.
We need to install vim-full version to solve this problem perfectly
$ sudo apt-get remove vim-common
$ sudo apt-get install vim
Following I will recommend a well configured vimrc file, including syntax highlighting, display and highlight the current line, automatically add the first file, ect.
The most function are commented out inside.
The ‘ “ ‘ (double quotes) can be removed before the statement and save.
Rename the unzipped .cimrc file to vimrc, then
$ sudo mv ***/.vimrc ***/vimrc //rename ***is the path you save the unzipped .vimrc file $ sudo mv ***/vimrc /etc/vim/ //remove $ sudo chmod 666 vimrc //add the write and read access to vimrc, or it will read only but can'y write.
[/vc_column_text][/vc_tab][vc_tab title=”Install and use ctag” tab_id=”1393867255621-2-6″][vc_column_text]Install as follows
$ sudo apt-get install ctags
Creat tags file under your project directory through
$ ctags -R
The ctags can find the corresponding definition through the index then achieve the jumper.
Here I set opencv library for example, I create the tags file in the file of opencv library
$ cd /usr/local/include $ ctags -R $ ls
We can see the generated tags file, and the open an example of opencv.
Although at this time the tags file has been generated but we don’t seem to tell the vim where the tags is.
So we input the set at the vim command
to find the tags file vim, and through the tags file index to jump to the corresponding position.
Move the cursor to the IplImage structure pointer, and then press CTRL +] key.
It will jump to corresponding definition place.
Press CTRL + o (the letter “o”) will jump back.[/vc_column_text][/vc_tab][vc_tab title=”Install and use the taglist ” tab_id=”1393867257068-3-7″][vc_column_text]Download the taglist_46 , unzip it and will get doc and plugin files。
Put the taglist.vim file in the plugin files into the install path of vim installation path plugin file
$ sudo cp /media/USB Disk/taglist.vim /usr/share/vim/vim73/plugin
Then modify the vim configure file( vimac) .
$ sudo vi /etc/vim/vimrc
At last add
let Tlist_Ctags_Cmd=’/usr/bin/ctags’ //set the location of command ctags let Tlist_Show_One_File=1 //Only show current file which default is several let Tlist_Exit_OnlyWindow=1 //when the taglist is the last serial then close
We repoen the congfigured file of vim, enter the command mode and input: Tlist.
Look at the left to see if there is any variable button mapping out
[/vc_column_text][/vc_tab][vc_tab title=”Install and use WinManage” tab_id=”1393867257999-4-6″][vc_column_text]Through the plug-in winmanager , we can browser the project file, unzip the winmanager.zip，put the three suffixes files .vim of plugin into the vim plugin files
$ sudo cp ***/plugin/*.vim /usr/share/vim/vim73/plugin //***is the path you put the unzipped plugin files
Reopen the vim file , input the WMToggle with the command mode.
Use the cursor to choose the corresponding files, press enter to open the file.
[/vc_column_text][/vc_tab][vc_tab title=”Install the browser buffer” tab_id=”1393867364748-5-7″][vc_column_text]At last we add the browser buffer to vim, and copy the well downloaded minibufexpl to the installed vim plugin file.
It basically completed the vim configuration. We open the vi configuration vimrc to see the effect, discovered that buffer does not appear.
When operate the single file the buffer is useless. We open any another file through file browser, buffer appeared.
The routines will be shown behind.[/vc_column_text][/vc_tab][vc_tab title=”Some simple optimization” tab_id=”1393867366225-6-5″][vc_column_text]Vim has a simplified method to replace these instructions.
For example.The last line in vimrc add
let g:winManagerWindowLayout=’FileExplorer|TagList’ nmap wm :WMToggle<cr>
Through the first sentence, we can input WMToogle in command mode to open the browser file and browser tags.
Through the second sentence, WMToggle < cr > is mapped for wm, we can directly i input wm to open the taglist and winmanager n line mode at the end of the
At this time, the interface is divided into 5 parts shown as the begin one .
Acheive the switch through CTRL + ww , or CTRL + w + h, j, k, l correspond to switch to the left, up, down, right of the window.
In order to satisfy the conditions for using under Windows. Open vimrc file, the last line add
Let g: miniBufExplMapWindowNavArrows = 1
So that you can by using CTRL + up and down or so four direction keys to switch between the console window.[/vc_column_text][/vc_tab][vc_tab title=”Verify the IDE” tab_id=”1393867367295-7-9″][vc_column_text]First look at the configured vim ide interface
Take the hello.c in the figure above for example, and input the ‘make’ in the vim mode.
The executable hello file is generated from the path of the helo.c on the desktop.Wow! Compile function, although it is to call the outside compiler.Ha ha. And try press F8 in figure 5 interface you will find that you entered the GDB debug mode .Can compile debugging as well as can run.Press F5 in figure 5 interface as well. A prompt “Press ENTER or type the command to continue” Press ENTER.The results appeared. 520 linksprite. Up to now the ide is near the done.