"***************************************************************************** "** Name: chartab.vim - print a character table ** "** ** "** Type: global VIM plugin ** "** ** "** Author: Christian Habermann ** "** christian (at) habermann-net (point) de ** "** ** "** Copyright: (c) 2004 by Christian Habermann ** "** ** "** License: GNU General Public License 2 (GPL 2) or later ** "** ** "** This program is free software; you can redistribute it ** "** and/or modify it under the terms of the GNU General Public ** "** License as published by the Free Software Foundation; either ** "** version 2 of the License, or (at your option) any later ** "** version. ** "** ** "** This program is distributed in the hope that it will be ** "** useful, but WITHOUT ANY WARRANTY; without even the implied ** "** warrenty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ** "** PURPOSE. ** "** See the GNU General Public License for more details. ** "** ** "** Version: 1.0.0 ** "** tested under Linux and Win32, VIM and GVIM 6.2 ** "** ** "** History: 1.0.0 31. Jan. 2004 ** "** initial version ** "** ** "** ** "***************************************************************************** "** Description: ** "** This script provides a character table (yes, yet another one :-) ). ** "** But it has some nice features: ** "** - it takes advantage of syntax-highlighting ** "** - it allows to toggle base of codes without leaving buffer ** "** - it opens in currently active window, so no rearrangement of ** "** windows occur ** "** - special codes are viewed with their real names (NUL, ETX,...) ** "** - quitting is very simple and fast - just one keystroke ** "** ** "** Installation: ** "** To use this script copy it into your local plugin-directory ** "** Unix: ~./.vim/plugin ** "** Windows: c:\vimfiles\plugin ** "** After starting VIM this script is sourced automatically. ** "** ** "** By default, press ct to view character table. ** "** ** "** Configuration: ** "** - CT_CharTable ** "** mapping to open character table ** "** default: ** "** map ct CT_CharTable ** "** ** "** - g:ct_base ** "** Defines base of codes. Allowed values are 'hex' and 'dec'. ** "** Default is 'dec'. ** "** Add let g:ct_base="hex" to your .vimrc if you want to change it. ** "** ** "** Known limitations: ** "** If a character is not printable by Vim it is printed as two ** "** characters, e.g. ~A. This may cause a misalignment of the table. ** "** ** "** Known bugs: ** "** none - well, up to now :-) ** "** ** "** ** "** Happy vimming.... ** "***************************************************************************** " allow user to avoid loading this plugin and prevent loading twice if exists ("ct_chartable") finish endif let ct_chartable = 1 "***************************************************************************** "************************** C O N F I G U R A T I O N ************************ "***************************************************************************** " the mappings: if !hasmapto('CT_CharTable') map ct CT_CharTable endif map