Detect whether file uses tabs/spaces when it loads, using the user preference as a default [$75]

Bug #1224197 reported by Claire Charron
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
Wishlist
The Lemon Man

Bug Description

Take a look at what Geany does for an example.

Basically, detect the type of indenting for each file and use that whenever the user presses the tab key. For new files, default to what the user has set.

Tags: bounty

Related branches

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Yup, auto-detecting coding style will be great. I'm sure I've requested that already, but I can't find the bug report.

Changed in scratch:
status: New → Confirmed
Revision history for this message
Cody Garver (codygarver) wrote : Re: Detect whether file uses tabs/spaces when it loads, using the user preference as a default [$50]
summary: Detect whether file uses tabs/spaces when it loads, using the user
- preference as a default
+ preference as a default [$50]
tags: added: bounty
Revision history for this message
The Lemon Man (lemonboy) wrote :

Gah, I had linked the branch to the wrong ticket.

Revision history for this message
Lewis Goddard (lewisgoddard) wrote :

Some files I edit appear in the format:

1. Tabs for indentation
2. Spaces for

_TAB_ <meta name="title" _SPACES_ content="...
_TAB_ <meta name="description" _SPACES_ content="...

Will these be correctly detected by this branch, even if tabs do not appear first?

Revision history for this message
Lewis Goddard (lewisgoddard) wrote :

I assume is should only consider whitespace on the leading edge of a line.

Revision history for this message
Lewis Goddard (lewisgoddard) wrote :

1. Files using spaces.
2. Files using tabs.
3. Files using tabs for indentation, but then multiple spaces for formatting.

summary: Detect whether file uses tabs/spaces when it loads, using the user
- preference as a default [$50]
+ preference as a default [$75]
Cody Garver (codygarver)
Changed in scratch:
assignee: nobody → The Lemon Man (lemonboy)
importance: Undecided → Wishlist
milestone: none → freya-0.3.1
status: Confirmed → Fix Committed
Changed in scratch:
milestone: freya-0.3.1 → 2.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.