Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

Show first indentation level #21

Closed
padde opened this issue Mar 14, 2013 · 4 comments
Closed

Show first indentation level #21

padde opened this issue Mar 14, 2013 · 4 comments

Comments

@padde
Copy link
Contributor

padde commented Mar 14, 2013

When you use set listchars=tab:│\ in order to show tabs along indentLine, the result is not very pretty. This is because indentLine does not show the first indentation level:

screenshot

In general, i think it is good not to show the first indentation level, but listchars doesn't seem to provide this option. (Please correct me if i'm wrong). So i'd like to either be able to display the first indentation level with spaces, or to not display the first indentation level with tabs.

I can think of a few possibilities to address this issue:

  1. Provide an option to set if the first indent level is shown, e.g. g:indentLine_showFirstIndentLevel, default 0
  2. Provide an option to set the minimum indent level, e.g. g:indentLine_minimumIndentLevel, default 1
  3. Extend indentLines to show tabs, too. I admit this is my favourite option, as all indentation visualization would then be handled in one place, and there would be no need for showing the fist indentation level at all. Could be combined with (1) or (2)
padde added a commit to padde/indentLine that referenced this issue Mar 14, 2013
padde added a commit to padde/indentLine that referenced this issue Mar 14, 2013
padde added a commit to padde/indentLine that referenced this issue Mar 14, 2013
@padde
Copy link
Contributor Author

padde commented Mar 14, 2013

Please ignore the first two commits, i accidentally commited them, then amended and force pushed again. Sorry

padde added a commit to padde/indentLine that referenced this issue Mar 14, 2013
padde added a commit to padde/indentLine that referenced this issue Mar 14, 2013
Yggdroot added a commit that referenced this issue Mar 14, 2013
@padde
Copy link
Contributor Author

padde commented Mar 14, 2013

Thanks for merging! Should we close this for now?

How do you feel about showing Tabs?

@Yggdroot
Copy link
Owner

Actually, I don't think it's a good habit to indent code with both tabs and spaces. So I set 'expandtab' in vim. And I don't plan to support showing Tabs. If someone would, he can do it by himself.

@padde
Copy link
Contributor Author

padde commented Mar 15, 2013

I think mixing both is a horrible thing to do, but i have to look at legacy code quite often, which is indented this way.

Anyway, at the time of this writing, my fingers already type gg=G automatically when they see poorly formatted code :-)

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants