Tabs @ SOL, Spaces elsewhere

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Tabs @ SOL, Spaces elsewhere

Dominic Evans
Hi,

This has probably been covered before, but I couldn't find it in the tips.

When I push tab, if the only text before me on that line is whitespace
then I want to insert a proper tab (^I) of size tabstop but if there
is non whitepsace before me then I want to insert 'shiftwidth' number
of spaces.

This will lead to code such as the following, tab = underscore, space = dot:

_____if.(true)....//This should be replaced
_____{............//with a proper boolean
__________func();
_____}

(derkarl.org)

Regards,
Dom
Reply | Threaded
Open this post in threaded view
|

Re: Tabs @ SOL, Spaces elsewhere

Dominic Evans
Obviously I'd ideally want == to indent this using tabs.

On 22/09/05, Dominic Evans <[hidden email]> wrote:

> Hi,
>
> This has probably been covered before, but I couldn't find it in the tips.
>
> When I push tab, if the only text before me on that line is whitespace
> then I want to insert a proper tab (^I) of size tabstop but if there
> is non whitepsace before me then I want to insert 'shiftwidth' number
> of spaces.
>
> This will lead to code such as the following, tab = underscore, space = dot:
>
> _____if.(true)....//This should be replaced
> _____{............//with a proper boolean
> __________func();
> _____}
>
> (derkarl.org)
>
> Regards,
> Dom
>
Reply | Threaded
Open this post in threaded view
|

Re: Tabs @ SOL, Spaces elsewhere

Paul-433
In reply to this post by Dominic Evans
On Thu, 22 Sep 2005, Dominic Evans wrote:

> When I push tab, if the only text before me on that line is whitespace
> then I want to insert a proper tab (^I) of size tabstop but if there
> is non whitepsace before me then I want to insert 'shiftwidth' number
> of spaces.

That would be good :)

--

.