" ntservices.vim " Author: Hari Krishna " Last Change: 14-Feb-2003 @ 18:05 " Created: 16-Jan-2003 " Requires: Vim-6.0, multvals.vim(3.0) " Depends On: genutils.vim(1.4), Align.vim(17), winmanager.vim " Version: 1.4.1 " Licence: This program is free software; you can redistribute it and/or " modify it under the terms of the GNU General Public License. " See http://www.gnu.org/copyleft/gpl.txt " Download From: " http://www.vim.org/script.php?script_id=533 " Description: " - This plugin generates a list of NT services that are installed on the " local NT/W2K/XP machine with the current started status. You can " start/stop the service by pressing S or pause/continue the service by " pressing P on the corresponding entry. " - You can open the servicelist window through WinManager (as described in " the installation section below) or by assigning a hot key. You can use " the same hot key to open/close the window. Alternatively, you can also " use the :NTServices command to open/close the services window. " - You can choose which fields that you want to see by using the " NTservFields command. You can select the sort fields by pressing s " consecutively and r for reversing the sort direction. " - For the sake of efficiency, the list of services is cached. To see the " latest set of services and their states at any time, refresh the window " by pressing 'R'. " - It depends on other plugins, but except multvals, it is not absolutely " necessary to intall others. If you do, you may have a better " experience (as described in Installation section below). " Installation: " - Place the plugin in a plugin diretory under runtimepath and configure " WinManager according to your taste. E.g: " " let g:winManagerWindowLayout = 'FileExplorer,NTServices' " " You can then switch between FileExplorer and NTServices by pressing ^N " and ^P. " - If you don't want to use WinManager, you can still use the :NTServices " comamnd or assign a hotkey by placing the following in your vimrc: " " nmap NTServices " " You can substitute any key or sequnce of keys for in the above map. " - Requires multvals.vim to be installed. " - If genutils.vim is installed, it is used to sort the service list. " - If Align.vim is installed, it is used to format the output. " - Requires cscript.exe and net.exe to be in the path. " - Use g:ntservFields, g:ntservSortFieldIndex, g:ntservSortDirection to " specify field names, default sort field and the sort direction " respectively. Use NTservFields command to see the list of field names " possible. " TODO: if exists('loaded_ntservices') finish endif let loaded_ntservices = 1 " Make sure line-continuations won't cause any problem. This will be restored " at the end let s:save_cpo = &cpo set cpo&vim " Initialization {{{ nnoremap