LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-22-2008, 01:25 PM   #1
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Rep: Reputation: 15
vi editor in ubuntu8.1


Hi all,

I am used to work on RHEL4es. Recently i hv installed ubuntu8.1. I use vi editor. My problem is vi shows line numbers and colum numbers in RHEL4.0 but i am unable to see line and column numbers in ubutu vi. How to modify vi in ubuntu8.1 to show rows and columns.
 
Old 12-22-2008, 01:30 PM   #2
aznium
Member
 
Registered: Jun 2005
Posts: 36

Rep: Reputation: 15
:set number

apt-get install vim (maybe you need the full vim instead of vi)?
 
Old 12-22-2008, 01:37 PM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
echo "set number" >> ~/.virc
 
Old 12-22-2008, 08:11 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,699

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
echo "set number" >> ~/.vimrc

note the 'm'
 
Old 12-22-2008, 10:55 PM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
vi uses ~/.vimrc as well as vim?
 
Old 12-23-2008, 10:00 AM   #6
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Original Poster
Rep: Reputation: 15
Hello everybody...

:set number command will number the each row... but my question is in vi of RHEL4 bottom right corner always shows the the cursor position(at what line and which row). As the cursor moves the will also keep changing.... but this is not appearing in vi of ubuntu8.1
 
Old 12-23-2008, 10:00 AM   #7
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Original Poster
Rep: Reputation: 15
Hello everybody...

:set number command will number the each row... but my question is in vi of RHEL4 bottom right corner always shows the the cursor position(at what line and which row). As the cursor moves the will also keep changing.... but this is not appearing in vi of ubuntu8.1
 
Old 12-23-2008, 10:37 AM   #8
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
:set ruler

These can be found on Google, I am sure.
 
Old 12-23-2008, 10:57 AM   #9
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by visitnag View Post
Hi all,

I am used to work on RHEL4es. Recently i hv installed ubuntu8.1. I use vi editor. My problem is vi shows line numbers and colum numbers in RHEL4.0 but i am unable to see line and column numbers in ubutu vi. How to modify vi in ubuntu8.1 to show rows and columns.
Ubuntu actually ships with a castrated version of vim called vim-tiny. You want to install the full version of vim to get the functionality you're generally used to. There are a lot of general options you could set in your .vimrc file that would make your experience more familiar and more what you are used to. I'm a fan of setting the following:

Turn on the ruler and highlighting, off wordwrapping, visualbell, and vi compatibility.
set ruler
set hls
set nowrap
set novisualbell
set nocompatible

Default to ignoring case and don't butcher existing stuff
set ignorecase
set preservecase

Make backups but don't leave them scattered all over system.
set backup
set backupdir=~/.vim/backups

Turn on line numbers, autoindent, and don't use real tabs use spaces.
set number
set autoindent
set expandtabs

Turn on syntax highlighting
syntax on

ymmv based on what you do with the editor specifically.

Run "apt-get install vim-full" to fix most of your basic problems (without the need for a .vimrc even).

Most people type vi, but that's typically a link to another "version" of vi like vim-tiny, vim-full, or vile (shudder). It's nice that you can use (g)vim in windows and x too.

Last edited by rweaver; 12-23-2008 at 11:05 AM.
 
Old 12-24-2008, 01:43 AM   #10
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Original Poster
Rep: Reputation: 15
Thank you alot rveaver. Can you please explain me what happens when we use the command apt-get install <package>? In rhel4 we download the file and then install, we can c the file. Here with apt-get command can we see the downloaded file(to use in future that we dont need to download again)?

Last edited by visitnag; 12-24-2008 at 11:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is wrong with ubuntu8.10?why i can not install it? topheraholic Linux - Newbie 13 11-06-2008 07:40 AM
webcam app in ubuntu8.04 aditya.kulkarni Linux - Software 1 11-01-2008 07:37 PM
LAMP problem on ubuntu8.04 2beahacker Linux - Server 13 10-09-2008 12:34 AM
LVM configuration in UBUNTU8.04.1 ajay.karn Linux - Server 4 08-18-2008 06:04 AM
kde4 not so smooth on ubuntu8.04 arkarkwin Linux - Laptop and Netbook 2 08-01-2008 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration