- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- special character to insert with vi
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 03:14 AM
09-26-2003 03:14 AM
special character to insert with vi
help needed please : to insert character 1 in a text as exponent (or superscript or superior).
Any suggestion will be appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 03:22 AM
09-26-2003 03:22 AM
Re: special character to insert with vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 03:26 AM
09-26-2003 03:26 AM
Re: special character to insert with vi
A. Clay Stephenson June 17, 2001 3:31:59 AM GMT 8 pts
--------------------------------------------------------------------------------
You can use the Ctrl-V ket to quote special characters in vi but entering values above
decimal 127 is difficult. If you know the keyboard mapping to generate the A2 hex code then you would (while in insert mode in vi)
enter Ctrl-V, your combination of keys, then ESC to end the insert.
But there is a better way and you don't have to know the keyboard mapping of your particular terminal:
Use two text files file1 - with your hex codes
build like this:
echo "\0242\0244\c" > file1
This will create a two byte file with the octal values 242 (A2h) and 244 (A4h).
Now in your main file (e.g. file2) You enter whatever text you want and position the cursor at the desired point and do a :r file1 to read the two characters into your file. You can then copy and move them wherever you like.
This should fix you, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 03:36 AM
09-26-2003 03:36 AM
Re: special character to insert with vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2003 03:39 AM
09-26-2003 03:39 AM
Re: special character to insert with vi
To get an idea of how UNIX does this (and it ain't pretty) try this:
cd /usr/share/man/man1.Z
cat ls.1 | zcat
That will display the formatting instructions for the ls man page and then compare that to the normal output of 'man ls'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2003 11:06 PM
09-30-2003 11:06 PM
Re: special character to insert with vi
^[
and then you add your special character
as an example - to chane the color of your test (in Linux) you can use the following special character values:
black='^[[37;30m' # black on white bg
red='^[[37;31m' # red on white bg
green='^[[37;32m' # green on white bg
yellow='^[[37;33m' # yellow on white bg
blue='^[[37;34m' # blue on white bg
magenta='^[[37;35m' # magenta on white bg
cyan='^[[37;36m' # cyan on white bg