Project Management

From Notepad++ Wiki
Jump to: navigation, search
How to manage a development project using Notepad++


What is a project?

From a text editor's viewpoint, it is just a set of files you often edit at the same time. So, you want to easily

  • define such a set,
  • add/remove files from it,
  • rename a project,
  • simultaneously open part of a project, usually the one you were using last time you worked on the project,
  • possibly organize your project into some categories. They may be called folders, but do not need to map to a single folder on your computer.

Notepad++ has a facility to define, manipulate and use such projects. You can also use sessions to do the job, although in a different way, because sessions just keep track of opened sets of files.

The facility is made of three dockable panels invoked from View -> Project -> Project Panel n where n is 1, 2 or 3. Each panel actually displays a workspace, which can host any number of projects.

ProjectMgr.png
A workspace is a set of projects. A project is a set of files and folders. Files are actual references to files, but folders are your own creation - you cannot add an existing folder to a project, only its contents. Folders may contain folders as well as file references, as the nearby picture shows.

Projects and folders have names you can change at will. You can change the name of a file reference; a small symbol overlays the file icon to warn you when the file doesn't actually exist.

Workspace management

The WorkSpace button spawns a menu with a number of options. The same comes up on right clicking the workspace. As of version 5.9.4 RC, there is no keyboard interface to the panel.

Available commands are:

  1. New Workspace. This clears all workspace data and lets you start afresh.
  2. Open Workspace. Loads the workspace with the contents of a workspace file. The contents of workspace files are discussed in Editing Configuration Files.
  3. Template:Reload Workspace. Uses contents of current workspace file to rebuild the workspace.
  4. Save. Records in current workspace file the panel contents.
  5. Save As.... Allows you to choose a file name for the panel contents to be recorded into. This becomes the current workspace file.
  6. Save a Copy As.... Same, but the previous workspace file remains current. Same behaviour as the corresponding File menu command.
  7. Last but not least, Add New Project. The project is created with name "Project Name".

All items that can contain stuff have a folding symbol right to them, and clicking the symbol, double clicking the item or hitting Enter will toggle the expanded/collapsed state of the item.

Project management

Right clicking on a project, or using the Edit button when it is selected, brings up a few basic management commands:

  1. Rename. Like in Explorer, the label changes to an edit field to enter the new name. Like in Explorer, left clicking the label works the same. The context menu of the edit field is standard too, so if you can open an IME from it in Explorer, that works too.
  2. Add folder. Adds a folder the name of which you are prompted for. They bear no relation with whatever is on your file system. A folder is just a nestable container with a name.
  3. Add files.... Opens a file dialog to select files t add references to. Remember that filesystem folders are not eligible - clicking on them just opens them.
  4. Add files from Directory.... Opens a folder selection dialog that allows adding all the files of a directory as individual files, and all its subfolders as project folders.
  5. Remove. Removes project from workspace, if you confirm the move. Hitting Del will act the same.

Note that, as of v6.6.6, there is no drag and drop support, either for adding/removing items or changing their order.

Folder management

Works exactly like for projects, with the same available commands. You can view a project as a root folder, which basically is a folder.

File management

You still have the Rename and Remove commands, and no longer have an Add Folder command. Renaming the file changes the reference to point to a file in the same physical folder, but a different name. You are notified when the file doesn't exist NoSuchFile.png

Modify File Path works like renaming, but it brings up a dialog box displaying the fully qualified name of the file for editing. You could for instance switch between a file on C: and a remote version on some other N: drive.

Double clicking a file, or hitting Enter when selected, will open it in the active view if it exists, i. e. there is no icon overlay.

Using workspaces

So you can manage workspaces, so you may expect to use them. Actually, they only display files in a tree-like fashion. You open a file from there by double clicking it, or by selecting it and hitting Enter, but you cannot open multiple files using Ctrl- or Shift-click - sessions do allow opening several files in a single action.

Inside the project panel, items can be dragged and dropped so as to reorganize them. For similar purposes, moving items up and down is supported - keyboard shortcuts are provided, Ctrl-Up and Ctrl-Down respectively.

Workspace files

Any workspace is backed up by a workspace file. If you attempt to close Notepad++ or to open a different workspace, a message box prompts you whether to save the current contents, with the typical Yes / No / Cancel alternative. On choosing Yes, a save file dialog opens where you can define a file for the contents. Like for sessions, there is no preset directory to store workspace files in, and you cannot define a specific extension for them, which makes sense as Notepad++ wouldn't do anything special on opening such a file for edit. It just loads it as yet another configuration file which it clobbers on exit.