LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 08-21-2005, 09:42 PM   #1
ICO
Member
 
Registered: Aug 2003
Location: ~/.
Distribution: CentOS
Posts: 290

Rep: Reputation: 30
how to make a tab is 4 spaces width in vim?


I know it may have been asked for many times but I can't find a post about it.
Please help. thanks.
 
Old 08-21-2005, 10:07 PM   #2
ag2uki
Member
 
Registered: Oct 2004
Location: Yogyakarta, Indonesia
Distribution: Mandrake 9.0, 9.1, 9.2, 10.0
Posts: 84

Rep: Reputation: 16
we could use $HOME/.vimrc to configure it.
Add/modify the following options:

set tabstop=4

good luck!


regards
Agus Dwi Basuki
 
Old 08-21-2005, 10:12 PM   #3
ag2uki
Member
 
Registered: Oct 2004
Location: Yogyakarta, Indonesia
Distribution: Mandrake 9.0, 9.1, 9.2, 10.0
Posts: 84

Rep: Reputation: 16
If you meant to use a tab as 4 spaces, use the following set of options:

set tabstop=4
set shiftwidth=4
set expandtab

Add the above settings to your .vimrc file too.


regards
Agus Dwi Basuki
 
Old 08-22-2005, 12:51 AM   #4
ICO
Member
 
Registered: Aug 2003
Location: ~/.
Distribution: CentOS
Posts: 290

Original Poster
Rep: Reputation: 30
Another question is:
I can press Ctrl+Z to suspend the vim and back to console, how to resume then?
Also, where can I get a good program syntax highlight profile?
thanks a lot

Last edited by ICO; 08-22-2005 at 12:52 AM.
 
Old 08-22-2005, 08:36 PM   #5
ag2uki
Member
 
Registered: Oct 2004
Location: Yogyakarta, Indonesia
Distribution: Mandrake 9.0, 9.1, 9.2, 10.0
Posts: 84

Rep: Reputation: 16
Quote:
I can press Ctrl+Z to suspend the vim and back to console, how to resume then?
it's pretty simple. Just type: fg

Quote:
Also, where can I get a good program syntax highlight profile?
I've ever had the same problem. I upgraded my Vim, and then suddenly my Vim was really colorful
 
Old 08-23-2005, 02:02 AM   #6
ICO
Member
 
Registered: Aug 2003
Location: ~/.
Distribution: CentOS
Posts: 290

Original Poster
Rep: Reputation: 30
When I press enter, how to make the current position to the same indent level as the previous line?
 
Old 08-23-2005, 03:41 AM   #7
ag2uki
Member
 
Registered: Oct 2004
Location: Yogyakarta, Indonesia
Distribution: Mandrake 9.0, 9.1, 9.2, 10.0
Posts: 84

Rep: Reputation: 16
Code:
 set autoindent
We can use some options, i.e autoindent, cindent, smartindent, etc.
To see detail information about those options, ask google please

regards
Agus Dwi Basuki
 
1 members found this post helpful.
Old 03-03-2013, 01:03 PM   #8
castet
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
try this:

find /usr/share/vim -name '*.vim'

 
Old 03-05-2013, 10:24 AM   #9
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Did you happen to know that vim has extensive documentation built right into it? Try typing something like ":help tab" in it and start reading.

http://swaroopch.com/notes/Vim_en-Help/


Then there are sites like http://vim.wikia.com that also collect lots of good tips. And your favorite search engine can certainly help you locate more.


The "Ctrl+Z" thing, OTOH, is a function of the shell's job control system, not vim itself:

http://mywiki.wooledge.org/BashGuide/JobControl
http://gd.tuwien.ac.at/linuxcommand.org/lts0080.html
 
  


Reply



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
Tab width in Bash - how do I set it benr77 Linux - General 8 12-04-2012 10:53 AM
Huge spaces in all variable width fonts Dare Linux - Software 0 10-21-2004 12:45 PM
VIM doesn't complete filenames on pressing Tab The Scientist Linux - Software 2 10-13-2004 10:15 AM
Extremely stupid question about tab key (specifically in Vim) Imek Linux - Newbie 1 03-08-2004 05:11 PM
Configuring (g)vim-tab with C++/Java Mega Man X Programming 2 01-28-2004 06:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 08:30 PM.

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
Open Source Consulting | Domain Registration