LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   how to make a tab is 4 spaces width in vim? (https://www.linuxquestions.org/questions/suse-opensuse-60/how-to-make-a-tab-is-4-spaces-width-in-vim-355658/)

ICO 08-21-2005 10:42 PM

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.

ag2uki 08-21-2005 11:07 PM

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

set tabstop=4

good luck!


regards
Agus Dwi Basuki

ag2uki 08-21-2005 11:12 PM

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

ICO 08-22-2005 01:51 AM

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

ag2uki 08-22-2005 09:36 PM

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 :D

ICO 08-23-2005 03:02 AM

When I press enter, how to make the current position to the same indent level as the previous line?

ag2uki 08-23-2005 04:41 AM

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

castet 03-03-2013 02:03 PM

try this:

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

;)

David the H. 03-05-2013 11:24 AM

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


All times are GMT -5. The time now is 09:45 PM.