Emacs command to select only lines indented below a specified level (was: Scala considering significant indentation like Python)
Ben Finney
ben+python at benfinney.id.au
Tue May 23 18:46:01 EDT 2017
Fred Stluka <fred at bristle.com> writes:
> On 5/23/17 4:43 PM, Ben Finney wrote:
>
> > The ‘set-selective-display’ command […] is bound to ‘C-x $’ in
> > default Emacs.
>
> How do I specify the number of columns when using "C-x $"?
You will remember, from doing the Emacs tutorial when you first learned
Emacs, that all commands have a “prefix argument” available
<URL:https://www.emacswiki.org/emacs/PrefixArgument> that the command
can use to modify its behaviour.
So, use the prefix argument to specify the number of columns for
‘set-selective-display’.
E.g.:
M-9 C-x $ # Indentation >= 9 disappears.
C-u C-x $ # Indentation >= 4 disappears.
C-u 1 3 C-x $ # Indentation >= 13 disappears.
C-u C-u C-u $ # Indentation >= 64 disappears.
C-x $ # All lines reappear.
etc.
> Same for using the command at the M-x prompt. I type "M-x" and see the
> M-x prompt, then then type "set-selective-display" using tab to
> autocomplete it. But I can't then type a column number after a space
> or in parens or anything. What am I missing?
Time to work through the Emacs tutorial again; ‘C-h t’ :-)
--
\ “I call him Governor Bush because that's the only political |
`\ office he's ever held legally.” —George Carlin, 2008 |
_o__) |
Ben Finney
More information about the Python-list
mailing list