Sublime Forum

Indent Guides

#9

I prefer indent guides not to appear on column zero; so I changed line 65 to read:
if pos % tab_size == 0 and pos != 0:

Now, if only it were possible to make the indent guide thinnerā€¦

0 Likes

#10

Are you running the most recent build? Is it working in files with spaces, and just not ones with tabs, or is it not working at all? Can you confirm the plugin is running by throwing a print statement at the top of the main function?

0 Likes

#11

[quote=ā€œadzenithā€]

Are you running the most recent build? Is it working in files with spaces, and just not ones with tabs, or is it not working at all? Can you confirm the plugin is running by throwing a print statement at the top of the main function?[/quote]

I was able to get it working in the first version, but this one will not display guides for tabs or spaces O_o

Yes, Iā€™ve added a status_message in the first class and that displayed. I also added the user settings.

0 Likes

#12

Iā€™m sorry to throw in this a bit late but Iā€™ve reworked the older version a bit. Perhaps you want to adapt the changes in the attachment.

Iā€™m now going to test your newest versionā€¦
indent_guides_patch.zip (3.35 KB)

0 Likes

#13

Hereā€™s a new version thatā€™s cleaned up a lot and includes theblacklionā€™s changes.
indent_guides.py.zip (1.63 KB)

0 Likes

#14

Yeah - that works nicely - thanks! :smile:

0 Likes

#15

[quote=ā€œtheblacklionā€]

Yeah - that works nicely - thanks! :smile:[/quote]

Didnā€™t work for me.

Latest build, Windows 7 64Bit

Sad because I like them being there :frowning:

0 Likes

#16

You have

"show_indent_guides": true,
in your user file prefs?

0 Likes

#17

Looks great! ā€¦hey, is there any way to make guides be one pixel width instead of two?

0 Likes

#18

[quote=ā€œadzenithā€]You have

"show_indent_guides": true,
in your user file prefs?[/quote]

Yes.

0 Likes

#19

Unfortunately I believe this is impossible at the moment.

0 Likes

#20

[quote=ā€œjbrooksukā€]

[quote=ā€œadzenithā€]You have

"show_indent_guides": true,
in your user file prefs?[/quote]

Yes.[/quote]

Do you have any other data you can give me? Itā€™s hard for me to fix it if it works over here and I donā€™t know why it doesnā€™t work over there.
Thanks!

0 Likes

#21

[quote=ā€œadzenithā€]Do you have any other data you can give me? Itā€™s hard for me to fix it if it works over here and I donā€™t know why it doesnā€™t work over there.
Thanks![/quote]

What do you want to know?

0 Likes

#22

It would be handy to include the contents of the console: itā€™ll confirm that the plugin was actually loaded, and any python exceptions will be reported there.

0 Likes

#23

startup, version: 2024 windows x64 channel: dev executable: /C/Program Files/Sublime Text 2/sublime_text.exe working dir: /C/Windows/system32 packages path: /C/Users/James.Brooks/AppData/Roaming/Sublime Text 2/Packages settings path: /C/Users/James.Brooks/AppData/Roaming/Sublime Text 2/Settings package /C/Program Files/Sublime Text 2/Pristine Packages/ActionScript.sublime-package is newer than the installed version (/C/Users/James.Brooks/AppData/Roaming/Sublime Text 2/Pristine Packages/ActionScript.sublime-package), running PackageSetup error parsing session: No data at: 0:0 PackageSetup returned: -1 scanning /C/Users/James.Brooks/AppData/Roaming/Sublime Text 2/Packages scanned /C/Users/James.Brooks/AppData/Roaming/Sublime Text 2/Packages catalogue loaded found 1 files for base name Default.sublime-theme found 2 files for base name Default (Windows).sublime-keymap found 1 files for base name Main.sublime-menu Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\comment.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\copy_path.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\delete_word.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\detect_indentation.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\duplicate_line.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\exec.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\find_under_expand.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\font.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\goto_line.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\indentation.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\kill_ring.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\mark.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\scroll.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\sort.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\swap_line.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\switch_file.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\transform.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\transpose.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\Default\trim_trailing_white_space.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\User\indent_guides.py Reloading plugin C:\Users\James.Brooks\AppData\Roaming\Sublime Text 2\Packages\User\insert_nums.py loading bindings theme loaded app ready scanning /X/tropicalwarehouse.co.uk loaded 918 snippets

0 Likes

#24

Clearly it appears to be loadingā€¦ and youā€™ve got the option to enable it set in your user file prefsā€¦
Can you type the following in the console and tell me what comes out? I just want to confirm that the settings have managed to make it into this view.

print(view.settings().get("show_indent_guides"))
0 Likes

#25

[quote=ā€œadzenithā€]Clearly it appears to be loadingā€¦ and youā€™ve got the option to enable it set in your user file prefsā€¦
Can you type the following in the console and tell me what comes out? I just want to confirm that the settings have managed to make it into this view.

print(view.settings().get("show_indent_guides"))

:open_mouth:

It returned false, but then I realised I put the options in the wrong fileā€¦

Sorry about that!

0 Likes

#26

Sorry to revive a slightly older thread but Iā€™m having trouble installing this plugin on the portable version of Sublime.

Can someone please give me a (quick) ā€œinstallation guide for dummiesā€? (Yes I really have spent time trying and have RTFM :smiley:)

Many thanks

0 Likes

#27
  • Download the source file from the link in the first post.

  • In Sublime Text 2, go to Preferences>Browse Packagesā€¦

  • Put the file you downloaded in Packages/User/.

  • In Sublime Text 2, open up the file you downloaded. It has instructions for lines to add to your user file prefs. If you donā€™t add these lines to that file, nothing will happen (to get to your user file prefs, go to Preferences>User File Prefs).

Let me know if it doesnā€™t work!

0 Likes

#28

Today I got to work on a clusterfuck of a file with a 76 space indent at one point (38 tabs).
As such, I modified the indent guides plugin a little bit so that it can also highlight the current indent guide.
The idea is that if my cursor is at column 4, all of the indent guides on column 4 are highlighted a slightly different color.
This is super useful if you are trying to balance tags or something, just click before a tag, and scroll down, following the highlighted indent guide.
The modified file is here: github.com/ajpalkovic/SublimePl ā€¦ _guides.py

0 Likes