View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 2 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Sep 22, 2008 10:12 pm 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
Get vi arrow keys working in insert mode and more

Copy the following to ~/.vimrc for each user that you want to fix.
That probably means to /root/.vimrc and to /home/mythtv/.vimrc
at least. Fixes cursor keys in insert mode and replace mode as well
as some other things.

Code:
" Mandrakelinux configuration.
" Rafael Garcia-Suarez <rgarciasuarez@mandrakesoft.com>

" Don't set vi-compatibility
set nocp

" Syntax highlighting only for vim-enhanced
if has("syntax")
    syntax on
endif

" I know it's horrible for a vi master but useful for newbies.
imap <C-a> <Esc>I
imap <C-e> <ESC>A
map <C-Tab> <C-W>w
imap <C-Tab> <C-O><C-W>w
cmap <C-Tab> <C-C><C-Tab>

" Some macros to manage the buffer of vim
map <F5> :bp<C-M>
map <F6> :bn<C-M>
map <F7> :bd<C-M>

" Default backspace like normal
set bs=2

" Terminal for 80 char ? so vim can play till 79 char.
"set textwidth=79

" Some options deactivated by default (remove the "no" to enable them)
set nobackup
set nohlsearch
set noincsearch

" Always display a status-bar
" set laststatus=2

" Show the position of the cursor
set ruler

" Uncomment this to disable wrap
"set nowrap

" Show matching parentheses
set showmatch

" Make % work with <>
set mps+=<:>

I copied this from my old Mandriva router box where I have noticed
that vi works so much better for years...

Cliff


Top
 Profile  
 
PostPosted: Tue Sep 23, 2008 4:50 pm 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
cliffsjunk wrote:
Copy the following to ~/.vimrc for each user that you want to fix.


Try copying it to /etc/vimrc to make it global for the system.

Mike

P.S. Generally this will only work for vim. For some systems vi opens in legacy mode and would not read this file. Works fine on KM though

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu