From: Joost Kremers <joostkremers@fastmail.fm>
To: Krishnakant <krmane@openmailbox.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: how to highlight block end in Python-mode indentation
Date: Sat, 20 May 2017 10:49:20 +0200 [thread overview]
Message-ID: <87y3trx69b.fsf@fastmail.fm> (raw)
In-Reply-To: <ff2950c2-b027-8bfd-0e6d-9d89c4c9e642@openmailbox.org>
On Sat, May 20 2017, Krishnakant wrote:
> I tryed indent-gide and it sutes perfectly.
> Just one question.
> How can I have it work for every block and not just for class
> and function in
> Python?
> It is not effective for if, while try: catch etc.
> I am sure it can be made to work because the screenshot on the
> github page has
> it there.
Well, the only customisation I have regarding `indent-guide' is
this:
(setq indent-guide-char "│")
And for me, it does work with if and other blocks.
Are you sure it doesn't work? Note that indent-guide doesn't show
indentation if point is on the line that begins the block. So if
you have:
```
def some_fun(arg):
print("Hi!")
if arg = 1:
print("How are you?")
elif arg = 2:
print("How do you do?")
else:
print("I don't want to know you.")
Now if point is on the line `def...`, no indentation markers are
shown. They appear when you move point down. Similarly, if point
is on the line `if...`, it doesn't show the indentation of the if
block but of the def block. Once you move down to the line
`print("How are you?")`, it'll show the indentation of the if
block.
HTH
--
Joost Kremers
Life has its moments
next prev parent reply other threads:[~2017-05-20 8:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 12:01 how to highlight block end in Python-mode indentation Krishnakant
2017-05-19 12:18 ` Joost Kremers
2017-05-19 12:30 ` Krishnakant
2017-05-20 6:37 ` Krishnakant
2017-05-20 8:49 ` Joost Kremers [this message]
2017-05-19 19:18 ` Tomas Nordin
2017-05-19 19:43 ` Joost Kremers
2017-05-21 11:16 ` Krishnakant
2017-05-21 11:27 ` Skip Montanaro
2017-05-21 11:38 ` Krishnakant
2017-05-21 12:04 ` Yuri Khan
2017-05-21 13:46 ` Krishnakant
2017-05-21 14:16 ` Skip Montanaro
2017-05-21 14:45 ` Yuri Khan
2017-05-21 15:58 ` Krishnakant
2017-05-21 12:40 ` Skip Montanaro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3trx69b.fsf@fastmail.fm \
--to=joostkremers@fastmail.fm \
--cc=help-gnu-emacs@gnu.org \
--cc=krmane@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).