CDE And Vim -- Getting Color, and the PageUp PageDown keys
Brief
I am forced to use CDE on a Sun Machine that I need to use for my
classes. I like Vim, It is good. But I couldn't get the page up and page
down to work, and the crappy version of xterm that is installed by default
does not have color for syntax highlighting. The PageUP and PageDOWN are
mapped to control the ever useless scroll bar.
HOWTO - DTTERM
- Use DTTERM ("Terminal") which supports color
- Modify the .Xdefaults to change the default keymap that is set for
the PageUp and PageDown
settings.
- To Override the location of the VIM syntax and Help files :
Add this to your ~/.vimrc at the VERY top
helpfile=/usr/local/share/vim/vim57/doc/help.txt
syn on
- To swap Control + Caps Lock and Alt and Meta (make the sun keyboard act
like a PC keyboard ) :
- File: .xmodmap
! Swap Cap_lock and Control
!remove Lock = Caps_Lock
!remove Control = Control_L
!keysym Control_L = Caps_Lock
!keysym Caps_Lock = Control_L
!add Lock = Caps_Lock
!add Control = Control_L
!
! Make Cap_Lock control as well as control
! For some reason you have to clear the control keys
! before doing this, and then readd them.
!
clear control
clear lock
keysym Caps_Lock = Control_R
add control = Control_L Control_R
!
! Swap Alt and diamond
!remove mod1 = Alt_L
!remove mod4 = Meta_L
!keysym Alt_L = Meta_L
!keysym Meta_L = Alt_L
!add mod1 = Alt_L
!add mod4 = Meta_L
!
! Make Diamond alt
remove mod4 = Meta_L
add mod1 = Meta_L
- Run xmodmap ~/.xmodmap
- Make sure you invoke vim not vi (the OLD version that ships
with solaris)
- To get things to start up automatically in CDE :
- ~/.dt/sessions/sessionetc
Make this file executable (chmod +x sessionetc)
#!/bin/sh
HOSTNAME=`hostname`
xmodmap $HOME/.xmodmap
xrdb -all -merge $HOME/.Xdefaults
dtterm -bg black -fg white -sb -vb -geometry 100x40 -C -title $HOSTNAME -xrm *menuBar:false &
HOWTO - XTERM
SanJeev K gave me this information
as well for doing the same thing w/ Xterm:
Add this line to your .Xdefaults and run xrdb like above:
XTerm.VT100.Translations: #override\<Key>osfPageUp: string(prior)\n\ <Key>osfPageDown: string(next)
links
- Vim - The best text editor there is.
E-mail if this does you any good.
|
|