hello again
hello again from the newbie. i was wondering if there is an option to use spaces instead of tabs in my indenting and tabbing, especially when in python. This wouldn't be an issue, but i have written most of my stuff in JEdit using soft tabs and now when i mess with one of the files in vim, i get problems about indentation not being right. just wondering. and thanks shawn
RE: hello again
Hello. Look up :help on 'ts' (with the single quotes), 'sts', 'sw' and 'et'. Basically, you want to :set 'tabstop' to 8, 'shiftwidth' to whatever you like to indent and 'expandtab' to on. This will take care of new code that you write. To convert existing tab-based indents, set 'tabstop' to the actual indent (4, for example), type :retab! to retab the whole thing and then set tabstop back to 8. At least, that's how I play this game :) Hope this help, Salman. -Original Message- From: shawn bright [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 2:44 PM To: vimlist Subject: hello again hello again from the newbie. i was wondering if there is an option to use spaces instead of tabs in my indenting and tabbing, especially when in python. This wouldn't be an issue, but i have written most of my stuff in JEdit using soft tabs and now when i mess with one of the files in vim, i get problems about indentation not being right. just wondering. and thanks shawn
Re: hello again
i was wondering if there is an option to use spaces instead of tabs in my indenting and tabbing, especially when in python. You can set the 'expandtab' option to behave as you like. You may also want to tweak your 'ts' and 'sw' options to act in accord. Thus, you may want to do :set et ts=4 sw=4 If you want to convert from one format to the other, you can also use the :retab command. You can read more at :help 'et' :he 'ts' :he 'sw' :he :retab HTH, -tim
Spaces vs. tabs (Was: hello again)
shawn bright wrote: hello again from the newbie. Please use a more descriptive Subject line: I almost threw your mail away as spam. i was wondering if there is an option to use spaces instead of tabs in my indenting and tabbing, especially when in python. Sure. See: :help 'expandtab' :help :retab This wouldn't be an issue, but i have written most of my stuff in JEdit using soft tabs and now when i mess with one of the files in vim, i get problems about indentation not being right. just wondering. and thanks shawn Best regards, Tony. -- Don't tell me I'm burning the candle at both ends -- tell me where to get more wax!!