Author Topic: extended ascii characters in vi (vim)?  (Read 2003 times)

dishawjp

  • Member
  • **
  • Posts: 133
  • Kudos: 95
    • http://web.lemoyne/~dishawjp
extended ascii characters in vi (vim)?
« on: 22 November 2002, 00:24 »
Hi All,

I wanted to put something a little different into my /etc/motd file... something using extended ascii characters to make boxes and a frame along with the text.  Anyway, I have no idea how to acess these in vi(m).  I did one up in DOS edit, but Linux had some severe problems reading it and it substituted some other, unintended characters.

Anyone had any experience doing this or know where I can locate a chart for doing this?

TIA,

Jim
____________________________
Registered Linux User 294493

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
extended ascii characters in vi (vim)?
« Reply #1 on: 22 November 2002, 01:33 »
VIM can do upper ASCII, do ":help digraphs" in VIM for instructions. Short answer "CTRL-k" followed by code.

But for the motd I would use 7 bit and not 8 bit chars (no high ASCII characters). Remember, Linux is intended to be used on many hardware platforms, some terminals are not capable of high ASCII characters and will f00k them up if you do use high ASCII chars.. I know that may not be the answer you were looking for and I am sure there is some way to do what you want. How bad do you want to do this?

It has a lot to do with what your terminal capabilities are (termcap and character set, "echo $TERM", "man ascii"). But there are certain things you can do using the curses library which does support upper ascii (if the terminal supports it). And you can use ANSI color if the terminal supports it, even in the /etc/motd. You might want to redirect the output of this command to your motd:

http://www.deater.net/weave/vmwprod/linux_logo/

[ November 21, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

dishawjp

  • Member
  • **
  • Posts: 133
  • Kudos: 95
    • http://web.lemoyne/~dishawjp
extended ascii characters in vi (vim)?
« Reply #2 on: 22 November 2002, 08:28 »
Once again, thanks void main!

It really is no big deal, but I wanted to have something "neat" to look at when I log in (and also to have others see when I show off my Linux box).  ANSI graphics (after loading ansi.sys) and extended ascii characters are pretty simple in DOS and since I generally work from command lines regardless of the OS I'm using I like to make things look a bit "nicer" or "cooler" when I log on to my toys or show them off.

Thanks again and I'll play with it some more this weekend.

Jim
____________________________
Registered Linux User 294493

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
extended ascii characters in vi (vim)?
« Reply #3 on: 22 November 2002, 10:58 »
quote:
Originally posted by X11 / BOB: The croc hunter:

You will be presented with a nice login!



Not if yer ssh/telneting in from a remote machine which is what I *believe* he is talking about.
Someone please remove this account. Thanks...

Calum

  • Global Moderator
  • Member
  • ***
  • Posts: 7,812
  • Kudos: 1000
    • Calum Carlyle's music
extended ascii characters in vi (vim)?
« Reply #4 on: 22 November 2002, 12:56 »
void main: re http://www.deater.net/weave/vmwprod/linux_logo/

that is a fantastic thing! thank you very much!

when my pentium 75 finally arrives, i will be putting that on it. Maybe i'll try out the asm version...
visit these websites and make yourself happy forever:
It's my music! | My music on MySpace | Integrational Polytheism

Calum

  • Global Moderator
  • Member
  • ***
  • Posts: 7,812
  • Kudos: 1000
    • Calum Carlyle's music
extended ascii characters in vi (vim)?
« Reply #5 on: 22 November 2002, 13:34 »
that second one 'the older, more classic mode', is the default first screen if you use a mandrake 8.2 boot disk (don't think it's there in 9 though)! i knew i had seen it somewhere before!
visit these websites and make yourself happy forever:
It's my music! | My music on MySpace | Integrational Polytheism