" ntprocesses.vim " Author: Hari Krishna " Last Change: 26-Feb-2004 @ 19:26 " Created: 21-Jan-2003 " Requires: Vim-6.2, multvals.vim(3.5), genutils.vim(1.10) " Depends On: 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=568 " Description: " - This plugin generates a list of NT processes that are running on the " local NT/W2K/XP machine. You can kill any by processing K on the " corresponding entry. " - You can open the processlist 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 :NTProcesses command to open/close the processes window. " - You can choose which fields that you want to see by using the " NtpFields command. You can select the sort fields by pressing s " consecutively and r for reversing the sort direction. " - If you have permissions, you can view the process list in a remote m/c " by using the NtpSetHost command. With no arguments, it prints the " current remote host name. To switch back to the local m/c, use "." for " the host name. " - For the sake of speed, the list of processes is cached. To see the " latest set of processes and their states at any time, refresh the window " by pressing 'R'. " - It requires multvals and genutils plugins to be always installed, but " others are required only depending on your usage/setting (for a better " experience and formatting). " Installation: " - Place the plugin in a plugin diretory under runtimepath and configure " WinManager according to your taste. E.g: " " let g:winManagerWindowLayout = 'FileExplorer,NTProcesses' " " You can then switch between FileExplorer and NTProcesses by pressing ^N " and ^P. " - If you don't want to use WinManager, you can still use the :NTProcesses " comamnd or assign a hotkey by placing the following in your vimrc: " " nmap NTProcesses " " You can substitute any key or sequnce of keys for in the above map. " - Requires multvals.vim to be installed. Download from: " http://www.vim.org/script.php?script_id=171 " - Requires genutils.vim to be installed. Download from: " http://www.vim.org/script.php?script_id=197 " - If Align.vim is installed, it is used to format the output. " - Requires cscript.exe to be in the path. " - Use g:ntprocFields, g:ntprocSortFieldIndex, g:ntprocSortDirection to " specify field names, default sort field and the sort direction " respectively. Use NtpFields command to see the list of field names " possible. " TODO: if exists('loaded_ntprocesses') finish endif if v:version < 602 echomsg "You need Vim 6.2 to run this version of ntprocesses.vim." finish endif if !exists("loaded_multvals") runtime plugin/multvals.vim endif if !exists("loaded_multvals") || loaded_multvals < 305 echomsg "ntprocesses: You need a newer version of multvals.vim plugin" finish endif if !exists("loaded_genutils") runtime plugin/genutils.vim endif if !exists("loaded_genutils") || loaded_genutils < 110 echomsg "ntprocesses: You need a newer version of genutils.vim plugin" finish endif let loaded_ntprocesses = 1 if ! OnMS() finish endif " 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