yii vim eclimd how it works

I want to create a wiki page, and therefore im opening this discussion on this forum, for answering all questions and see other opinions, how do you use vim with yii.

At first, i work with Gvim.

I have a script file for opening saved session and custom bindings for every project.




#!/bin/bash

if [[ $# != 1 ]]

then

    zenity --title "Vim IDE usage error" --error --text "Usage: vim_ide /path/to/project/dir."

    exit 1

fi


if [[ ! -e "$1/.vim/ide.vim" ]]

then

    zenity --title "Vim IDE usage error" --error --text "'$1' is not a Vim IDE project directory."

    exit 1

fi


cd "$1" || { zenity --title "Vim IDE usage error" --error --text "Can't change current directory to Vim IDE project directory '$1'."; exit 1; }



My every project has .vim folder under the root folder. there is one file at start .vim/ide.vim




set sessionoptions-=options

au VimLeave * :mksession! .vim/ide.session

    if getfsize(".vim/ide.session") >= 0

        source .vim/ide.session

    endif



Above is a default code for every project. But sometimes i have several bindings in this file, for example binding deployng files to production server




nmap <f3> :execute "Nwrite ftp://username@*.*.60.252/httpdocs/".expand("%")<CR> //Now i can upload files via ftp to production server. 

nmap <f12> :! cd /home/alex/site.com/yii-version/protected/tests/ && phpunit  ./functional/AdminPanelTest.php<cr> // i run tests when i code



And i open project with next command $~/ide.sh /path/to/project . And it opens my project with all opened files, and tabs saved on last exit.

I use tabs for my code process. Next tabs i see on my every project:


Tests tab | Controllers Tab | Layouts tab | Views Tab | Model Tab | Temporary working tab

i use shortcuts for switching between them:




<leader>tt - tests tab

<leader>tc - controllers tab

<leader>tl - layouts tab

<leader>tv - views tab

<leader>tm - model tab

<leader>tw - working tab



For explorering i also have some bindings:




<leader>sv - slplit window and open Views folder

<leader>sc - slplit window and open Controllers folder

<leader>st - slplit window and open Tests folder

<leader>sm - slplit window and open Models folder

// also i use leader>v to explore folder without splitting.

// or if im editing model file and want to open another model, i just use <leader>e which makes :Explore command and open current folder for me

<leader>cm - open main config for yii project



What about my autocomplete ?

I use eclimd plugin and it has good eclipse autocomplete funcional. I see small window with preview variables which function needs.

And preview window closes when i leave current insert mode.

Im open to discuss and share my experience.

Hey, can you provide some information about how To use those bundles?

which bundle you mean ? i have my vim settings on github.

actual information is in my article http://www.yiiframework.com/wiki/151/yii-vim-eclimd-how-it-works/

Thank you for this. This helps a lot.