Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Development & Programming > Programming Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Programming Talk
This forum is for all programming questions.
The questions do not have to be directly related to Ubuntu and any programming language is allowed.

 
Thread Tools Display Modes
Old August 8th, 2006   #1
cope
Just Give Me the Beans!
 
Join Date: Jun 2005
Beans: 50
vim tab size

hey guys,

i use jedit when programming or gedit when editing configs, but sometimes its just quicker and easier to do things in vim since the load time is so small..

i'm having a problem setting the option to change the tab size from 8 to 4.
when i try (even when sudo) it complains about "buftype option is set"

buftype isn't set its ""
am i supposed to be doing something else? I guess the question is how the hell do i edit vim options?
__________________
double your hard drive space... delete windows
cope is offline   Reply With Quote
Old August 8th, 2006   #2
slakkie
Fresh Brewed Ubuntu
 
slakkie's Avatar
 
Join Date: May 2006
Location: Amsterdam
Beans: 1,497
Kubuntu Development Release
Re: vim tab size

Code:
:set tabstop=4  # set tabstop at 4
:set ts=8       # set tabstop at 8
Or put in in your ~/.vimrc
slakkie is offline   Reply With Quote
Old August 8th, 2006   #3
wjp.reg
Quad Shot of Ubuntu
 
wjp.reg's Avatar
 
Join Date: Jun 2005
Location: Ontario, Canada
Beans: 462
Ubuntu Karmic Koala (testing)
Re: vim tab size

Quote:
Originally Posted by cope View Post
hey guys,

i use jedit when programming or gedit when editing configs, but sometimes its just quicker and easier to do things in vim since the load time is so small..

i'm having a problem setting the option to change the tab size from 8 to 4.
when i try (even when sudo) it complains about "buftype option is set"

buftype isn't set its ""
am i supposed to be doing something else? I guess the question is how the hell do i edit vim options?
Quote:
Tab Settings
(to set the tab-size, type :set ts=2 (or whatever number you want)
(also, for tabbing-size, set shiftwidth (>) by typing :set sw=2Navigation
http://simpletutorials.com/w3/index....im%20Reference

Works on my system. (don't forget the leading ":" colon

cheers
__________________
Linux user 394816 / Ubuntu user 16154 Lenovo 3000 N100 Laptop :T2400(1.83GHz), 2GB RAM, 100GB 5400rpm HD, 14.1in 1280x800 LCD, Intel 950, CDRW/DVDRW, Intel PRO/Wireless 3945ABG, Bluetooth/Modem, 10/100 Realtek Ethernet, Fingerprint reader
wjp.reg is offline   Reply With Quote
Old August 8th, 2006   #4
cope
Just Give Me the Beans!
 
Join Date: Jun 2005
Beans: 50
Re: vim tab size

thanks guys, i didn't realise vim was so open to customisation..
i've downloaded a few tutorials, and even a couple of plugins!

very impressed, i can see what all the hype is about.. i might put jedit aside for the moment and see how fast i can get writing in vim..
__________________
double your hard drive space... delete windows
cope is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:21 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry