sponsor Vim development Vim logo Vim Book Ad

layoutManager : Create layouts from tabs, templates and windows and control them.

 script karma  Rating 0/0, Downloaded by 396    Comments, bugs, improvements  Vim wiki

created by
Alexandre Viau
 
script type
utility
 
description
"===========================================
" LayoutManager plugin
"===========================================

" Version 1.0.2
"
" LayoutManager.vim allows to create layouts composed named of tabs and windows and do operations on these tabs and windows. The main idea is that tabs and windows are given names, for example, a window named "menu" could contain a menu file, another window called "code" could contain the code file, another one named "output" could contain the compiler's output text etc. The goal was to have a multiple windows environment similar to an IDE environment like visual studio for examples with windows and tabs with names that do different things, and were content may be "sent" to specific windows using commands, links (utl), mappings and especially from other script files and project files etc.
"
" In the zip file, I put in the example of a project file (.vim) I am currently doing that will be using the layoutManager.vim plugin. It is not finished but you are free to look at it to see how to use the plugin.
"
" I tried to use an object programming style in vimscript because I thought it was suitable for this type of application.
"
" Here is an example of utilisation of layoutManager.vim:
"
" " Create a new layout
" let myLayout1 = g:lmLayout.New('MyLayout1')
"
" " Add tabs to the layout
" call myLayout1.Tabs.Add(g:lmTab.New('MyTab1', 'MyTemplate1'))
" call myLayout1.Tabs.Add(g:lmTab.New('MyTab2', 'MyTemplate2'))
"
" " Send commands to some of the windows of MyTab1
" call myLayout1.Tabs.MyTab1.Windows.code.Execute('e ' . $VIM . '/vimrc') " Show the vimrc file in the code window
" call myLayout1.Tabs.MyTab1.Windows.output.Write("this is the output window 1!", 3) " Write text in the output window
" call myLayout1.Tabs.MyTab1.Windows.files.ExecuteShell('dir c:') " List a directory in the files window
" call myLayout1.Tabs.MyTab1.Windows.code.SetFocus()
"
" " Send commands to some of the windows of MyTab2
" call myLayout1.Tabs.MyTab2.Windows.menu.Write("this is the menu!", 3) " Write text in the menu window
" call myLayout1.Tabs.MyTab2.Windows.code2.Execute('e ' . $VIM . '/vimrc') " Show the vimrc file in the code2 window
"
" let myLayout2 = s:layout.New('MyLayout2')
"
" " Set focus to MyTab1
" call myLayout1.Tabs.MyTab1.SetFocus()
"
" Note that I didn't finish the examples or the documentation, but the plugin is working fine with these initial features. Feel free to propose any features or to send comments.

" See sample project file included in the zip file

" Todo:
" Remove tabs and windows from the containers, at the same time from the editor
" Ajouter une fonction pour aller directement a une fenetre style gt 1 gt 5 pour les tabs mais pour une fenetre
 
install details
Copy the file layoutManager.vim to your vim plugin directory.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
layoutManager.vim 1.0.3 2012-11-19 7.0 Alexandre Viau Changed the file format to unix
layoutManager.zip 1.0.2 2012-11-17 7.0 Alexandre Viau I included a better sample project file to use with the plugin. I use this sample project file myself so I tested it.
layoutManager.vim 1.0.1 2012-09-15 7.0 Alexandre Viau Added documentation to the file.
layoutManager.vim 1.0 2012-09-15 7.0 Alexandre Viau Initial upload
ip used for rating: 54.167.207.16

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo