l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2001 Dec 30 16:58

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] ROT13 in vi?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] ROT13 in vi?

* Mark Kim <mkkim@ucdavis.edu> [001116 02:53], about 
> Re: [vox-tech] ROT13 in vi?:
:Actually, I wanted to know the way to do ROT-N, where N is any arbitrary
:number, including 13.  Mike's way of doing it was using :tr but I can't
:figure it out.  It was something like:
:   :%tr/[A-Za-z]/[N-ZA-Mn-za-m]/g

Are you sure?

$ grep rot ~/.vimrc 
:map rot :!tr A-Za-z N-ZA-Mn-za-m

Ohh.. lesse.. I understand now, you were using vi to do it, hmm.. vim help tr
doesn't seem to be the same as the unix tr command?  (And I don't see a 'tr'
in the sed man page either.  OHh wait, I do see a y/ command, but I don't
see that command in vi(m).)

The way I use this mapping in vim is to do a visual block, and just type
'rot'.  I am unsure if this is supported in vi.. Okay, just did a
:%!tr A-Za-z N-ZA-Mn-za-m

and it seemed to work.  (let's just say 'good enough' ;)

I don't remember exactly where I got this map from, but it must have been
from a vim page, since as I mentioned I use it with 'v' (visual blocks).
(hmm, was just trying to remember what the hoizontal block was but can't


>-- End of excerpt from Mark Kim

Hmm, having trouble figuring out how to get your version of the expression
to work, would have to look at it later.. You're sure you're not thinking
perl or anything right?  (Been playing with perl a little lately and the
differences in regexes, for example, I encountered.. annoying. Let's just
say that.  (I wouldn't've guessed I supopse would be the problem..))

(just saw this as one of the last lines in my procmail log, so by
chance/randomness I got to see it.. ;)


Arg.. wrong sig chosen again, have my mutt send-hooks look for lug not
mother.. arg..

Milpitas, ca    ajay@os2man.cjb.net     HempVille, Planet Talarian
        "I'd rather be forgotten than remembered for giving in..."

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.