sponsor Vim development Vim logo Vim Book Ad

myprojects : Organize/Navigate projects of files (like IDE/buffer explorer/project.vim)

 script karma  Rating 62/24, Downloaded by 5973  Comments, bugs, improvements  Vim wiki

created by
Frederic Hardy
 
script type
utility
 
description
You can use it to set up a list of frequently-accessed files for easy navigation.
The list of files will be displayed in a window on the left side of the Vim window.
Unlike project.vim, myprojects.vim use indentation instead of mark to define folder.
Main features are file exploration, tags generation, filtering, working directory definition, vim session management, F1 to F12 mapping definition, make definition, errorformat definition, buffers explorer and svn checkout/update/add/commit/revert/diff/blame/info/resolved/log support.
Please, report any bug to myprojects.vim[..at..]mageekbox.net.
Help for debug is welcome !
 
install details
Download vimball, open it with vim, and do :so %.
After that, reopen vim and do <leader>p (ie \p if <leader> has its default value) or :MyProjectsToggle.
It's an alpha-version (release early, release often), so do regular :GLVS to be up-to-date (see :h GLVS for more information).
<leader>-p open panel like command :MyProjectsToggle.
You can also map "<Plug>MyProjectsToggle" to open panel : map <silent> <Tab> <Plug>MyProjectsToggle.
In panel :
<Return> open file or folder under cursor.
<2-Leftmouse> open file or folder under mouse cursor.
<S-Return> open file or folder under cursor in an horizontaly splitted window.
<S-2-Leftmouse> open file or folder under mouse cursor in an horizontaly splitted window.
<C-Return> open file or folder under cursor in a verticaly splitted window.
<C-2-Leftmouse> open file or folder under mouse cursor in a verticaly splitted window.
<C-Tab> go to previous window.
<C-Right> increase panel size of g:myprojects_resize_step.
<C-l> increase panel size of g:myprojects_resize_step.
<C-Left> decrease panel size of g:myprojects_resize_step.
<C-h> decrease panel size of g:myprojects_resize_step.
<C-Space> set panel fullscreen, or set it to its size before <C-Space>.
<LocalLeader>d delete file under cursor.
<LocalLeader>c create a project.
<LocalLeader>r refresh line where is cursor.
<LocalLeader>R refresh folder where is cursor.
<LocalLeader>g make grep against folder where is cursor.
<LocalLeader>t generate tags file for project where is cursor.
<LocalLeader>e explore folder where is cursor.
<LocalLeader>E explore folder where is cursor in an horizontaly splitted window.
<LocalLeader>a append file under cursor to buffer in previous window.
<LocalLeader>s save session for project where is cursor.
<LocalLeader>S load session for project where is cursor.
<LocalLeader><A-s> delete session for project where is cursor.
<LocalLeader>p set path for file or folder under cursor.
<LocalLeader>P update nested path for file or folder under cursor.
<LocalLeader>f set filter for folder where is curosr.
<LocalLeader>F update nested filter for file or folder where is cursor.
<LocalLeader>w set workigng directory for file or folder where is cursor.
<LocalLeader>W update nested working directory for folder where is cursor.
<LocalLeader>m set F1 to F12 mappings for file or folder where is cursor.
<LocalLeader>M update nested mappings for file or folder where is cursor.
<LocalLeader>i display in status line path of filer or folder under cursor.
<LocalLeader>v display in status line myprojects.vim's version.
<LocalLeader>V display in status line myprojects.vim's file.
<LocalLeader>b display buffers of project where is cursor.
<LocalLeader>ss do a svn status for file or folder under cursor and display result in a separate window.
<LocalLeader>sc do a svn commit for file or folder under cursor, you can select file and define log message in a separate window.
<LocalLeader>su do a svn update for file or folder under cursor and display result in a separate window.
<LocalLeader>sd do a svn diff for file under cursor and display result in two separate window in diff mode.
<LocalLeader>sb do a svn blame for file under cursor and display result in a window.
<LocalLeader>sr do a svn revert for file under cursor and display result in a separate window.
<LocalLeader>sa do a svn add for file under cursor and display result in a separate window.
<LocalLeader>sC do a svn checkout and create the corresponding project.
<LocalLeader>si do a svn info on current file or folder.
<LocalLeader>sl do a svn log on current file or folder.
<LocalLeader>src do a svn resolved on current file or folder.
<LocalLeader>k define make program (see :h :make for more informations) for current file/folder.
<LocalLeader>K update make program (see :h :make for more informations) for current file/folder.
<LocalLeader>ef define errorformat (see :h errorformat for more informations) for current file/folder.
<LocalLeader>Ef update errorformat (see :h errorformat for more informations) for current file/folder.
<LocalLeader>df define project type's preferences (path, working directory, mappings, etc).
<LocalLeader>te set test attribute value, use to find test file of a file open from myprojects.
<LocalLeader>Te update test attribute value.
<LocalLeader>et from a file opened from myprojects open its test file (if 'foo.php' was opened from myprojects.vim and test attribute's value is '.test.php', <localLeader>et open the file 'foot.test.php' in a horizontaly splitted window).
You can open file in svn window like in myproject's panel.
You can do a diff from working window with <A-d>.
By default, LocalLeader is '\'.
You can remap it with "let maplocalleader = ','" in your .vimrc, for example.
Folder can have filters against file on your hard drive.
Filters are vim patterns (see :h patterns for more informations).
If a working directory is defined on a folder or its parents, a "cd" vim command is done when a file in the folder is open, see :h :cd for more informations.
Moreover, you can define normal mapping for <F1> to <F12> for each folder in a project.
For example, you can map F10 with :!php -l %:p 2>&1<CR> to check php syntax of a php file opened with myprojects.
You can also define make and errorformat for each file or folder, see :h make and :h errorformat for more information.
GetLatestVimScripts is also supported, see :h GLVS for more information about it.
g:myprojects_width variable set the panel's width, default is 30.
g:myprojects_file variable set the myproject's file name, default is ~/.myprojects.
g:myprojects_tags_file variable set the tags file name, default is .tags.
g:myprojects_auto_close variable close the panel when a file is open, default is 0.
g:myprojects_auto_open variable open automaticaly myprojects.vim at vim startup.
g:myprojects_syntax variable activate syntax highlighting, default is 1.
g:myprojects_display_empty_folder variable display empty folder, default is 0.
g:myprojects_auto_resize variable resize the panel to its default size when a file is open, default is 0.
g:myprojects_resize_step define the step used to resize panel with <C-Left> and <C-Right>, default is 10.
g:myprojects_display_number display line number in panel, default is 0.
g:myprojects_display_path_in_statusline display path of current file in status line, default is 1.
g:myprojects_cursorline display cursor line, default is 1.
g:myprojects_cursorcolumn display cursor column, default is 1.
g:myprojects_foldcolumn display folder column, default is 0, see :h foldcolumn for more informations.
ctags or exctags must be installed to generate tags file.
g:myprojects_tags_generator define tag generator utility, default is 'exctags'.
g:myprojects_new_file_on_bottom add new file on bottom of folder on refresh, default is 1.
g:myprojects_svn_sort sort path in svn window, default is 1.
g:myprojects_autowrite auto save g:myprojects_file after refresh, default is 1.
You can override default value of these variables with "let g:myprojects_svn_sort = 0" in your .vimrc, for example.
 

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
myprojects.vba 0.0.107 2009-08-21 7.0 Frederic Hardy All my apologize, the previous vimball was incorrect.
myprojects.vba 0.0.105 2009-06-02 7.0 Frederic Hardy Remove bug in svn blame.
myprojects.vba 0.0.104 2009-05-27 7.0 Frederic Hardy Remove bug in update of mappings.
myprojects.vba 0.0.103 2009-05-15 7.0 Frederic Hardy Improve svn checkout which now use preferences.
myprojects.vba 0.0.102 2009-05-15 7.0 Frederic Hardy Remove bug in svn checkout processus.
myprojects.vba 0.0.101 2009-05-13 7.0 Frederic Hardy Remove bug in svn conflict resolution, file can now be opened from svn conflict window.
Remove bug in grep.
myprojects.vba 0.0.100 2009-05-07 7.0 Frederic Hardy Add autowrite management after set or update of an attribute (path, cd, make, errorformat, mappings, etc).
"|" are now correclty escaped in mappings.
myprojects.vba 0.0.99 2009-05-06 7.0 Frederic Hardy Improve speed.
myprojects.vba 0.0.98 2009-05-06 7.0 Frederic Hardy Remove bugs in loadMyProjectsAttribute() and svnDiff().
myprojects.vba 0.0.97 2009-05-06 7.0 Frederic Hardy Remove bug in buffer management.
Add autowrite on refresh with g:myprojets_autowrite.
myprojects.vba 0.0.96 2009-05-04 7.0 Frederic Hardy Remove bug in svn log.
myprojects.vba 0.0.95 2009-05-04 7.0 Frederic Hardy Add svn log support with <LocalLeader>sl.
myprojects.vba 0.0.94 2009-05-04 7.0 Frederic Hardy Remove bug about test in project creation, thanks to alexis for its feedback about that.
myprojects.vba 0.0.93 2009-04-30 7.0 Frederic Hardy If there are several potential test file for the current file, a list is submitted to user to choose the right file.
myprojects.vba 0.0.92 2009-04-30 7.0 Frederic Hardy Remove bug in test file searching.
myprojects.vba 0.0.91 2009-04-30 7.0 Frederic Hardy Test extension is managed in preferences.
myprojects.vba 0.0.90 2009-04-30 7.0 Frederic Hardy Remove bug in project buffer management.
myprojects.vba 0.0.88 2009-04-29 7.0 Frederic Hardy Remove bug in window management (thanks to alexis).
Remove bug in refresh management.
Upgrade from any previous version is very recommanded.
Add test file support.
If test attribute is defined on a file or a folder, <LocalLeader>et in a file opened from myprojects.vim open the associated test file.
For example, if opened file is 'foo.php', and test attribute value is 'Test.php', <LocalLeader>et open the file 'fooTest.php' if it exists in myprojects.vim panel.
<LocalLeader>te set test attribute value.
<LocalLeader>Te update test attribute value.
This attribute is not currently supported in preferences.
myprojects.vba 0.0.87 2009-04-28 7.0 Frederic Hardy Remove bug in refresh method to keep make and errorformat attribute.
Add <LocalLeader>ra to refresh attributes in a file open with myprojects.
myprojects.vba 0.0.80 2009-04-17 7.0 Frederic Hardy Use inputsecret() to get svn password on checkout.
Deleted files in myprojects are not re-add on refresh (if you want to re-add them, remove refresh attribute).
myprojects.vba 0.0.70 2009-04-06 7.0 Frederic Hardy Remapping of <LeftMouse> and <S-LeftMouse> to display path in status line only if g:myprojects_display_path_in_statusline is set to 1.
myprojects.vba 0.0.60 2009-03-27 7.0 Frederic Hardy Optimization in session management.
Remove bug in buffer deletion in project's buffer.
myprojects.vba 0.0.50 2009-03-23 7.0 Frederic Hardy Add svn add (<A-a>) and svn revert (<A-r>) support.
myprojects.vba 0.0.30 2009-03-12 7.0 Frederic Hardy Add appendFile() method.
<C-a> on a file in panel now append its content to file in previous window.
Remove a bug in session management.
Moreover, if a file in panel does not exist on your hard drive when you open it, its buffer will be created.
myprojects.vba 0.0.20 2009-03-09 7.0 Frederic Hardy Project creation now works from an empty file.
Changing working directory when a file is opened now works.
Thanks to seeschloss and jeff ;) which have detected these bugs.
myprojects.vim 0.0.10 2009-03-02 7.0 Frederic Hardy Remove a bug in s:open() about mapping.
myprojects.vim 0.0.1 2009-02-26 7.2 Frederic Hardy Initial upload
ip used for rating: 35.175.174.36

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.
   
Vim at Github