AIX - VI/VIM Newbie Keymapping Help.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers AIX - VI/VIM Newbie Keymapping Help.
# 1  
Old 07-10-2012
AIX - VI/VIM Newbie Keymapping Help.

When I use the PgUp/PgDn keys it does strange things, like make the next letters change case. I know that it's because what the key is sending is telling vi to move to the next letter and change the case, but I'm absolutely having no luck in remapping PgUp/PgDn (CTRL+B/F) to those keys.

CTRL+V on the two gives me:
PgUp - ^[[5~
PgDn - ^[[6~

I'm not very affluent in VIM configuration, but I simply cannot get this remap to fucntion. In case it's needed, my .vimrc is below:

Code:
" ==== settings ====
syn on                          " Turn on syntax highlighting
set nocompatible                " Allow for a lot more options
set expandtab                   " When you hit tab actually use spaces
set history=50                  " keep 50 lines of command line history
set hlsearch                    " Switch on highlighting of the last used search pattern
set ignorecase                  " On searches
set smartcase                   " Works with ignorecase
set laststatus=2                " Make sure the status line is always displayed
set nobackup                    " Do not create backups
set nocompatible                " Better for Vim features
set nu                          " turn on line numbers
set ruler                       " Display ruler
set shell=/bin/ksh              " Set default shell
set showcmd                     " Show commands
set showmatch                   " Shiow matching brackets
set showmode                    " Display what mode you are in
set smartindent                 " Turn on file typed indenting
set tabstop=4                   " Number of spaces when converting tabs
set shiftwidth=4                " Characters added for indentation
set viminfo='1000,f1,<500       " File information to Keep
set backspace=indent,eol,start  " Expected backspace behavior
set pastetoggle=<F2>            " Allows for proper pasting when indents would occur.
set background=dark             " This is set for white on black
retab                           " When you open a file, convert all the tab characters into spaces.

" ==== Folding ====
" Disable folding by default, we'll enable it with a hotkey
function ForceFoldmethodIndent()
    if &foldenable
        se foldmethod=indent
    endif
endfunction
nnoremap <F9> zi|call ForceFoldmethodIndent()
inoremap <F9> zi|call ForceFoldmethodIndent()
set nofoldenable                " Disable folding by default, we'll enable it with a hotkey

" ==== File based settings ====
filetype plugin on
filetype indent on
if has("autocmd")
    " Restore cursor position
    au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif

    " Filetypes (au = autocmd)
    au FileType helpfile set nonumber      " no line numbers when viewing help
    au FileType helpfile nnoremap <buffer><cr> <c-]>   " Enter selects subject
    au FileType helpfile nnoremap <buffer><bs> <c-T>   " Backspace to go back
    " Rexx
    au BufRead,BufNewFile *.zrx  setfiletype rexx
    au BufRead,BufNewFile *.rx  setfiletype rexx
    au BufRead,BufNewFile *.rexx  setfiletype rexx
    " C types - Set coding indents
    au FileType cpp,c,java,sh,pl,php,asp  set autoindent
    au FileType cpp,c,java,sh,pl,php,asp  set smartindent
    au FileType cpp,c,java,sh,pl,php,asp  set cindent
    " Text files
    au BufRead,BufNewFile *.txt  setfiletype txt
    au BufRead,BufNewFile *.log  setfiletype txt
    au BufRead,BufNewFile *.vcf  setfiletype txt
    " Automatically chmod +x Shell and Perl scripts
    "au BufWritePost   *.sh             !chmod +x %
    "au BufWritePost   *.pl             !chmod +x %
    " File formats
    " Misc types
    au BufNewFile,BufRead  *.pls    set syntax=dosini
    au BufNewFile,BufRead  modprobe.conf    set syntax=modconf
    au BufNewFile,BufRead  *.d    set syntax=dtrace
    " Shell scripts
endif

" ==== HUD ====
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
set listchars=tab:\|\ ,trail:�,eol:<

" ==== Version 7 related ====
if version >= 700 
    "set spell                    " turn on spell check
  au InsertEnter * hi StatusLine term=reverse ctermbg=5 gui=undercurl guisp=Magenta 
  au InsertLeave * hi StatusLine term=reverse ctermfg=0 ctermbg=2 gui=bold,reverse 
endif

" DOS to Unix conversion (remove ^M)
" added mark (m) so we end up where we started
noremap <Leader>D mmHmt:%s/<C-V><CR>//ge<CR>'tzt'm

" Fixes color on AIX 5.3
if has("terminfo")
    let &t_Co=8
    let &t_Sf="\e[3%p1%dm"
    let &t_Sb="\e[4%p1%dm"
else
    let &t_Co=8
    let &t_Sf="\e[3%dm"
    let &t_Sb="\e[4%dm"
endif

" Fix for delete when it doesn't work right on AIX...
map! ^[[3~ <BS>

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX/Unix Newbie help

Ok, I'm an admin (assistant, helper, enabler) in a software test lab. I don't do the testing, but I help set things up for people who do. I'm experienced in Windows and various virtualization techniques, but not so much in Linux or Unix. I've been able to muddle through some things with Unix,... (6 Replies)
Discussion started by: dgingeri
6 Replies

2. AIX

Newbie to Aix

Hi All, I am new to Aix and want to have in depth knowledge, can anybody assisst me with video tutorials like cbt nuggets or trainsignal or something like that...i would be really greateful if anybody could help me out in this regard. Any suggestion on how to move on getting... (4 Replies)
Discussion started by: katherine2008
4 Replies

3. AIX

Newbie Questions for AIX !!!

Hi Guys, I am new in this forum and new with AIX however not new with Power System. I have worked with iSeries for many years. Now supporting AIX on Power. Here are some basic questions I have. 1. I am using Putty to connect from my PC to the AIX boxes. Is there any other (better) program to... (6 Replies)
Discussion started by: 300zxmuro
6 Replies

4. HP-UX

Newbie on AIX ! What 're document can be use?

I'm newbie on AIX of IBM , but I don't know about documents for starter. Can I help me ? Tks for your recommend ! (1 Reply)
Discussion started by: quan0509
1 Replies

5. AIX

VIM for AIX

Hey guys, Does anyone know how can I set theme for my vim in AIX? I have installed VIM but do not what to do now :) Here is what I have when run rpm -qa | grep vim vim-enhanced-6.3-1 vim-common-6.3-1 Is this all needed? thanks alot (1 Reply)
Discussion started by: LooLoo
1 Replies

6. Shell Programming and Scripting

How to install VIM in AIX UNIX

:)Hi to all, Please help me about how to install VIM in UNIX AIX Box. Thanks. (1 Reply)
Discussion started by: div_Neev
1 Replies

7. AIX

vim on AIX

Hello I am trying to install vim on an AIX 5.3 server. I am using the 6.3 vim runtimes. when executing, i run into the following problem: exec(): 0509-036 Cannot load program /usr/local/bin/vim because of the following errors: 0509-150 Dependent module libtermcap.a(shr.o) could... (2 Replies)
Discussion started by: mhenryj
2 Replies

8. SCO

Keymapping Issues

Hi, When I use T5125 HP Thin Client to connect to a SCO server, the display is not correct and keys are not doing their original action For example the vertical lines (done by | character) are are done by 3 character The horizontal lines ____ are done of dddd Pressing F4 or F12 instead of... (0 Replies)
Discussion started by: pb_uvce
0 Replies

9. AIX

Newbie in AIX

Hello Everybody, and sorry for the question in this forum. My problem is that I have started working on a company and there is an AIX server. In order to look for documentation and start doing stuff on it first I would like to know WHICH version it is!!!! I know that this is a silly question... (2 Replies)
Discussion started by: inakipaz
2 Replies

10. AIX

AIX newbie, i need help

how do I make the cdrom bootable, i.e. im tyring to reinstall aix from cd-rom, and i want the system to boot to the cd-rom? I think i need to change the bootlist, but not sure how to... Thanks (8 Replies)
Discussion started by: csaunders
8 Replies
Login or Register to Ask a Question