Документ взят из кэша поисковой машины. Адрес оригинального документа : http://jet.sao.ru/hq/sts/linux/doc/nedit/macro/1/1-10.shtml
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 10:34:58 2012
Кодировка:

Поисковые слова: comet
NEdit.org

.
.   
NEdit.org
   .

Home
 - News - Download - Documentation - Search - FTP     
.
.
  

Project macros

[Back]

A set of macros for handling sets of files.

project.nm

The above macro package allows you to define projects and have all the files associated with the projects loaded/closed/saved etc. It maintains two directory pointers: one for the default macro directory and the other to the local directory of the editor. When a project is loaded, the desired location has to be selected. If the same files need to be opened in different places, it may make more sense to have another project macro defined for each location of the files. This also eliminates the possibility of accidentally editing the wrong projects a bit. This feature can also be emulated by creating a project with no literal path to the files, therefore the files would be loaded from the current directory.

Here is the setup needed for the alternative macro package (it uses the $HOME/.neditutil subdirectory for macros) :

Add this to .neditmacro:

# home must be set here to make it available for macro loading
tmpstr = shell_command("echo $HOME", "")
$HOME = substring(tmpstr, 0, length(tmpstr) - 1)
$NEDITDIR = $HOME "/.neditutil/" 
load_macro_file($NEDITDIR "projects.nm") 
project_init()
Place projects.nm in $NEDITDIR, and create menu items to call the routines, ie:

Open Project > open_project()
Close Project > close_project()
Save Project > save_project()
Save Project As > save_project_as()
Save All > save_all()
Save All And Close > save_all() close_project()

[Back]


. Released on  Wed, 21 Nov 2001  by C. Denat  

  
Visit our sponsor
Check Metrolink

© NEdit.org
1999-2001
All rights reserved


.