Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76805 > unrolled thread
| Started by | Seymore4Head <Seymore4Head@Hotmail.invalid> |
|---|---|
| First post | 2014-08-22 14:19 -0400 |
| Last post | 2014-08-23 11:10 -0400 |
| Articles | 15 on this page of 35 — 19 participants |
Back to article view | Back to comp.lang.python
Global indent Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-22 14:19 -0400
Re: Global indent Skip Montanaro <skip@pobox.com> - 2014-08-22 13:34 -0500
Re: Global indent "Neil D. Cerutti" <neilc@norwich.edu> - 2014-08-22 14:44 -0400
Re: Global indent Dan Stromberg <drsalists@gmail.com> - 2014-08-22 12:21 -0700
Re: Global indent Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-22 15:46 -0400
Re: Global indent Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-08-22 12:54 -0700
Re: Global indent Marko Rauhamaa <marko@pacujo.net> - 2014-08-22 23:11 +0300
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 19:08 +1000
Re: Global indent Marko Rauhamaa <marko@pacujo.net> - 2014-08-23 12:32 +0300
Re: Global indent Christian Gollwitzer <auriocus@gmx.de> - 2014-08-23 11:41 +0200
Re: Global indent Joshua Landau <joshua@landau.ws> - 2014-08-23 15:19 +0100
Re: Global indent Christian Gollwitzer <auriocus@gmx.de> - 2014-08-23 18:17 +0200
Re: Global indent Joshua Landau <joshua@landau.ws> - 2014-08-23 21:57 +0100
Re: Global indent Rustom Mody <rustompmody@gmail.com> - 2014-08-23 14:55 -0700
Re: Global indent Joshua Landau <joshua@landau.ws> - 2014-08-24 20:24 +0100
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-24 00:56 +1000
Re: Global indent Christian Gollwitzer <auriocus@gmx.de> - 2014-08-23 18:09 +0200
Re: Global indent Anders Wegge Keller <wegge@wegge.dk> - 2014-08-23 22:43 +0200
Re: Global indent Marko Rauhamaa <marko@pacujo.net> - 2014-08-24 01:50 +0300
Re: Global indent Tim Chase <python.list@tim.thechases.com> - 2014-08-23 15:18 -0500
Re: Global indent Rustom Mody <rustompmody@gmail.com> - 2014-08-23 07:49 -0700
Re: Global indent [levity] Peter Pearson <pkpearson@nowhere.invalid> - 2014-08-23 17:17 +0000
Re: Global indent "Neil D. Cerutti" <neilc@norwich.edu> - 2014-08-22 16:16 -0400
Re: Global indent Dan Stromberg <drsalists@gmail.com> - 2014-08-22 14:14 -0700
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 19:31 +1000
Re: Global indent Tim Chase <python.list@tim.thechases.com> - 2014-08-23 15:09 -0500
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 18:19 +1000
Re: Global indent alister <alister.nospam.ware@ntlworld.com> - 2014-08-23 10:17 +0000
Re: Global indent Gene Heskett <gheskett@wdtv.com> - 2014-08-23 10:32 -0400
Re: Global indent Chris Angelico <rosuav@gmail.com> - 2014-08-23 06:20 +1000
Re: Global indent Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-22 21:59 +0100
Re: Global indent mm0fmf <none@mailinator.com> - 2014-08-23 12:50 +0100
Re: Global indent Simon Ward <simon@bleah.co.uk> - 2014-08-22 20:22 +0100
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 18:12 +1000
Re: Global indent Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-23 11:10 -0400
Page 2 of 2 — ← Prev page 1 [2]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2014-08-23 07:49 -0700 |
| Message-ID | <86098eb1-5105-491a-939b-597e2554c846@googlegroups.com> |
| In reply to | #76855 |
On Saturday, August 23, 2014 2:38:10 PM UTC+5:30, Steven D'Aprano wrote: > Marko Rauhamaa wrote: > > Rob Gaddi : > >> Emacs and vim both have huge learning curves > > Really now? > > When you start emacs, it advises you to start the builtin tutorial. > You need a tutorial for a text editor??? > If that's supposed to prove how easy Emacs is, you have failed miserably. > Any application which requires a tutorial should consider it a UI failure. > Ideally applications should be "intuitive" in the sense that all features > should be self-explanatory, obvious, and easily discovered. Of course, the > more complex the application, the less this is likely to be true, but every > feature that requires explanation is a feature that is begging for > improvement. > > That's how I learned it in the 1980's and didn't experience any learning > > curve. > No learning curve at all? That means one of two things: > - either you *instantly* intuited every single Emacs feature the moment you > started the application; or > - Emacs has no features at all. > I'm pretty sure neither of those is the case :-) > > Nowadays, emacs has a GUI that makes you productive immediately without > > any keyboard commands. I have seen complete newbies adopt emacs without > > any kind of duress or hardship. > I just started up emacs, and got a GUI window with an abstract picture of a > gnu and a bunch of instructions which I didn't get a chance to read. I > clicked on the text, and the instructions disappeared. I don't know how to > get them back. They were replaced with what looks like a blank page ready > to type into, except it starts with this ominous warning: > ;; This buffer is for notes you don't want to save, and for Lisp evaluation. > ;; If you want to create a file, visit that file with C-x C-f, > ;; then enter the text in that file's own buffer. > Why would I be writing notes I don't want to save? If I did, wouldn't I, you > know, just *not save them* instead of write them in a special buffer > (whatever that is!)? > Lisp evaluation? I don't have any speech impediments, thank you very much. > Okay, so let's try creating a file, using those instructions. I dutifully > type C-x C-f and, apart from "C-x C-f" appearing on the screen, nothing > happens. I wait a while in case it's just slow. > Ah, silly me, I need to *enter* the command to make it happen. So I press > Enter. Nothing happens except the cursor moves down a line. > Perhaps Emacs has frozen? The blinking cursor is still blinking, so that's > unlikely. > Okay, let's click the blank page icon, the universal symbol for creating a > new, blank document. That at least is recognisable. > Well, that's just bizarre. I expected a new document. Instead, I got a > message in the status bar at the bottom of the page, saying: > Find file: /home/steve/ > and the blinking cursor. I don't want to find a file, and if I did I would > use my computer's Find or Search application, not a text editor. So still > no new document I can type into. > When all else fails, use the menus. So I try the File menu. It's a bit > disconcerting that, alone of all the applications I've used on eight > different platforms (Windows 95, 98, XP, Classic Mac, Mac OS X, Linux with > Gnome, KDE and Xfce window managers), the mouse pointer points the other > way when over a menu, but hey, I'm a sophisticated user and I refuse to be > put off by such a minor, albeit gratuitous, difference. But there is no New > Document command, and I am stymied again. > I shall not be defeated by a mere text editor. I click the New Document icon > again, hoping that what failed last time will succeed this time. But at > least I am not entirely insane, for although I did not get a new document, > at least something different occurred: an error message appeared in the > status bar: > Command attempted to use minibuffer while in minibuffer > This is the moment that I decide to give up on Emacs and take up something > trivial in comparison, like being a Soyuz pilot, если вы знаете, что я имею > в виду. emacs = Editor for Middle Aged Computer Scientists - Generally Not Used vi = a program with two modes -- one in which it beeps and the other in which it corrupts your file
[toc] | [prev] | [next] | [standalone]
| From | Peter Pearson <pkpearson@nowhere.invalid> |
|---|---|
| Date | 2014-08-23 17:17 +0000 |
| Subject | Re: Global indent [levity] |
| Message-ID | <c5s0l5FatkjU1@mid.individual.net> |
| In reply to | #76855 |
On Sat, 23 Aug 2014 19:08:10 +1000, Steven D'Aprano wrote: > Marko Rauhamaa wrote: >> Rob Gaddi <rgaddi@technologyhighland.invalid>: >> >>> Emacs and vim both have huge learning curves >> >> Really now? >> >> When you start emacs, it advises you to start the builtin tutorial. > > You need a tutorial for a text editor??? Did you ever watch a bar scene in a cowboy western, and suddenly there's a loud noise, and a shout in a growly voice, and you just know that a brawl is about to break out? -- To email me, substitute nowhere->runbox, invalid->com.
[toc] | [prev] | [next] | [standalone]
| From | "Neil D. Cerutti" <neilc@norwich.edu> |
|---|---|
| Date | 2014-08-22 16:16 -0400 |
| Message-ID | <mailman.13306.1408738616.18130.python-list@python.org> |
| In reply to | #76814 |
On 8/22/2014 3:54 PM, Rob Gaddi wrote: > On Fri, 22 Aug 2014 15:46:33 -0400 > Seymore4Head <Seymore4Head@Hotmail.invalid> wrote: > >> On Fri, 22 Aug 2014 14:19:29 -0400, Seymore4Head >> <Seymore4Head@Hotmail.invalid> wrote: >> >>> Is there a way to indent everything again? >>> >>> Say I have a while statement with several lines of code and I want to >>> add a while outside that. That means indenting everything. Is there >>> a global way to do that? >> >> Ok.....so the answer is no using IDLE (Python GUI) >> >> The top two answers so far are Emacs and gvim. >> >> http://gvim.en.softonic.com/ Has a snazzy look, but I think it is not >> compatible with Windows so it looks like I might have to try Emacs. gvim runs just fine on Windows. http://www.vim.org/download.php >> Thanks everyone > > Emacs and vim both have huge learning curves that I've decided aren't > worth climbing. Notepad++ is an excellent GUI text editor for Windows. > Geany is nearly as good, and runs on anything. They do have a very long learning incline but it isn't actually as steep as it looks--it's just that it keeps going up as far as you can see. :) If simple things weren't simple to do, neither product would have ever succeeded. The GUI version of Vim (gvim), has beginner modes and Windows-like modes to help with the transitional phases. -- Neil Cerutti
[toc] | [prev] | [next] | [standalone]
| From | Dan Stromberg <drsalists@gmail.com> |
|---|---|
| Date | 2014-08-22 14:14 -0700 |
| Message-ID | <mailman.13310.1408742051.18130.python-list@python.org> |
| In reply to | #76814 |
On Fri, Aug 22, 2014 at 1:16 PM, Neil D. Cerutti <neilc@norwich.edu> wrote: >> Emacs and vim both have huge learning curves that I've decided aren't >> worth climbing. Notepad++ is an excellent GUI text editor for Windows. >> Geany is nearly as good, and runs on anything. > > > They do have a very long learning incline but it isn't actually as steep as > it looks--it's just that it keeps going up as far as you can see. :) > > If simple things weren't simple to do, neither product would have ever > succeeded. > > The GUI version of Vim (gvim), has beginner modes and Windows-like modes to > help with the transitional phases. Learning vi: http://stromberg.dnsalias.org/~strombrg/vi.ref.6 The first time I saw vi, I hated it. I thought "Why would anyone actually choose such a terrible editor?" But then I was forced to use vi for a while, and I'm glad I was. I choose it over other editors now. vi/vim give you a pretty much orthogonal set of verbs and nouns in an editing language. When I have to use editors that make you arrow-key around or click with a mouse, I feel like it's painfully slow - especially if I need to do the same thing 5 times in a row. Sure, some editors let you define macros - vi/vim do that too. But AFAIK, only vi/vim allow you to define a repeatable action without forethought.
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2014-08-23 19:31 +1000 |
| Message-ID | <53f85f6a$0$29966$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #76824 |
Dan Stromberg wrote: > The first time I saw vi, I hated it. I thought "Why would anyone > actually choose such a terrible editor?" > > But then I was forced to use vi for a while, and I'm glad I was. I > choose it over other editors now. vi/vim give you a pretty much > orthogonal set of verbs and nouns in an editing language. Sorry, but I have no idea what you mean by "orthogonal set of verbs and nouns in an editing language". Can you explain? > When I have to use editors that make you arrow-key around or click > with a mouse, I feel like it's painfully slow - especially if I need > to do the same thing 5 times in a row. Sure, some editors let you > define macros - vi/vim do that too. But AFAIK, only vi/vim allow you > to define a repeatable action without forethought. I find that between find/replace and Block Selection editing, I can't really say I've missed either the lack of editing macros or these orthogonal verbs, whatever they are. Occasionally I move a large editing job into Python, but I wouldn't want to learn a separate language for that. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| Date | 2014-08-23 15:09 -0500 |
| Message-ID | <mailman.13351.1408824664.18130.python-list@python.org> |
| In reply to | #76857 |
On 2014-08-23 19:31, Steven D'Aprano wrote:
> Sorry, but I have no idea what you mean by "orthogonal set of verbs
> and nouns in an editing language". Can you explain?
In the context of vi/vim, an "orthogonal set of verbs and nouns in an
editing language" mean that you have a collection of verbs
(such as d=delete, v=visual/highlight, y=yank/copy, c=change, zf=fold,
gU=transform-to-uppercase, gu=transform-to-lowercase, g~=swap-case,
g?=ROT13, "="=reformat, etc) and nouns (often called "motions" as most
of them can be used to move the cursor in normal-mode) such as
b=back, }=next-paragraph-boundary, {=previous-paragraph-boundary,
"*"=next-match-of-the-word-under-the-cursor, etc.
They're orthogonal because learning a new verb allows you to apply it
to all of the nouns/motions you already know; and learning a new
noun/motion lets you use it with any of the verbs you know. And you
can prefix any command (verb+noun) with a count which increases the
power further.
Thus, learning one new thing has a multiplying effect.
> I find that between find/replace and Block Selection editing, I
> can't really say I've missed either the lack of editing macros or
> these orthogonal verbs, whatever they are. Occasionally I move a
> large editing job into Python, but I wouldn't want to learn a
> separate language for that.
Much of the power comes in the repeatability of last action. Once
the editor understands that your last action meant
"transform-to-uppercase from the cursor to the end of the line", you
can move anywhere else in the document and instruct the editor to do
the same thing with a single command (in vi/vim, that's the period).
Drew Neil's _Practical Vim_ spends quite a bit of ink covering the
implications of repeatability.
[from another message from Steven]
> When I'm programming, actual fingers on keys is just a small
> proportion of the time spent. Most of my time is reading, thinking
> and planning, with typing and editing a distant fourth, and I not
> only don't mind moving off the keyboard onto the mouse, but
> actually think that's a good thing to shift my hands off the
> keyboard and use a different set of muscles. So I'm not especially
> receptive to arguments that Vim or Emacs will make me more
> productive.
I agree that a much smaller percentage of my time is spent actually
entering text and a far greater amount of time is spent navigating
(reading/thinking/planning) the document. Most vi/vim users spend
their time in normal mode where that navigation is quick and can all
be done from a keyboard. I find that
[and from yet another message from Steven]
> You need a tutorial for a text editor???
>
> If that's supposed to prove how easy Emacs is, you have failed
> miserably.
Indeed, both vim and emacs provide tutorials precisely because they
are NOT so easy to get started with. But while I might not need
instruction for a hand-saw to remove a small tree, if I had multiple
trees to cut down, I might want a chainsaw and seek to read the
instructions to get the most out of my investment. And if I had a
LOT of trees to cut down, I might make a major investment
https://www.youtube.com/watch?v=LYKg0gbRFns and read the heck out of
the instructions.
I happen to use vi/vim because it works just about everywhere (and
even comes installed from the factory on most *nix-likes), but as long
as people are using an editor that is sufficient to meet their needs,
I'm content to live in amicable harmony. It's when your needs exceed
what your editor can provide that I start to recommend
editor-shopping. I can't help you if you choose something other than
Vim, but I can encourage complainers to use a more powerful editor.
[and yet one other message from Steven]
> Besides, the standard text editor is ed:
THERE is the truth ;-) (and...it's far more powerful than Notepad)
-tkc
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2014-08-23 18:19 +1000 |
| Message-ID | <53f84e8a$0$29999$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #76814 |
Rob Gaddi wrote: > Emacs and vim both have huge learning curves that I've decided aren't > worth climbing. In my opinion, they are designed for people willing and able to commit to memory dozens, even hundreds, of obscure key sequences to get the simplest thing done. They are not designed for easy exploration of the application: you either know the command that you want, or you're stuck. Besides, the standard text editor is ed: http://www.gnu.org/fun/jokes/ed-msg.html > Notepad++ is an excellent GUI text editor for Windows. > Geany is nearly as good, and runs on anything. I have never used Notepad++, but I can give Geany good reviews. It's nearly as good as kate in KDE 3, and much better than kate in KDE 4. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | alister <alister.nospam.ware@ntlworld.com> |
|---|---|
| Date | 2014-08-23 10:17 +0000 |
| Message-ID | <USZJv.17328$p81.6567@fx21.am4> |
| In reply to | #76851 |
On Sat, 23 Aug 2014 18:19:21 +1000, Steven D'Aprano wrote: > Rob Gaddi wrote: > >> Emacs and vim both have huge learning curves that I've decided aren't >> worth climbing. > > In my opinion, they are designed for people willing and able to commit > to memory dozens, even hundreds, of obscure key sequences to get the > simplest thing done. They are not designed for easy exploration of the > application: you either know the command that you want, or you're stuck. > > Besides, the standard text editor is ed: > > http://www.gnu.org/fun/jokes/ed-msg.html > > >> Notepad++ is an excellent GUI text editor for Windows. >> Geany is nearly as good, and runs on anything. > > I have never used Notepad++, but I can give Geany good reviews. It's > nearly as good as kate in KDE 3, and much better than kate in KDE 4. I'll give Geany another thumbs up it is quite well featured but still light weight (i tend to do my personal work on a netbook so I don't have much in the way of resources) for the original problem Shift & Cursor UP/Down to highlight the block then Ctrl-I to indent or Ctrl-u to unindent. -- Is it weird in here, or is it just me? -- Steven Wright
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@wdtv.com> |
|---|---|
| Date | 2014-08-23 10:32 -0400 |
| Message-ID | <mailman.13345.1408804725.18130.python-list@python.org> |
| In reply to | #76861 |
On Saturday 23 August 2014 06:17:24 alister did opine And Gene did reply: > On Sat, 23 Aug 2014 18:19:21 +1000, Steven D'Aprano wrote: > > Rob Gaddi wrote: > >> Emacs and vim both have huge learning curves that I've decided > >> aren't worth climbing. > > > > In my opinion, they are designed for people willing and able to > > commit to memory dozens, even hundreds, of obscure key sequences to > > get the simplest thing done. They are not designed for easy > > exploration of the application: you either know the command that you > > want, or you're stuck. > > > > Besides, the standard text editor is ed: > > > > http://www.gnu.org/fun/jokes/ed-msg.html > > > >> Notepad++ is an excellent GUI text editor for Windows. > >> Geany is nearly as good, and runs on anything. > > > > I have never used Notepad++, but I can give Geany good reviews. It's > > nearly as good as kate in KDE 3, and much better than kate in KDE 4. > > I'll give Geany another thumbs up I would too, but for the code carving I do, gedit has syntax highlighters for calling attention to GCode formatting mistakes, Geany doesn't. It does look like a capable editor, but it just doesn't fit my instant needs. > it is quite well featured but still light weight (i tend to do my > personal work on a netbook so I don't have much in the way of > resources) > > for the original problem Shift & Cursor UP/Down to highlight the block > then Ctrl-I to indent or Ctrl-u to unindent. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-08-23 06:20 +1000 |
| Message-ID | <mailman.13307.1408738847.18130.python-list@python.org> |
| In reply to | #76813 |
On Sat, Aug 23, 2014 at 5:46 AM, Seymore4Head <Seymore4Head@hotmail.invalid> wrote: > On Fri, 22 Aug 2014 14:19:29 -0400, Seymore4Head > <Seymore4Head@Hotmail.invalid> wrote: > >>Is there a way to indent everything again? >> >>Say I have a while statement with several lines of code and I want to >>add a while outside that. That means indenting everything. Is there >>a global way to do that? > > Ok.....so the answer is no using IDLE (Python GUI) This is very much an editor question, so you ought to have said *right at the beginning* that you're using Idle's editor. Try selecting a bunch of text and hitting Tab. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-08-22 21:59 +0100 |
| Message-ID | <mailman.13309.1408741186.18130.python-list@python.org> |
| In reply to | #76813 |
On 22/08/2014 21:20, Chris Angelico wrote: > On Sat, Aug 23, 2014 at 5:46 AM, Seymore4Head > <Seymore4Head@hotmail.invalid> wrote: >> On Fri, 22 Aug 2014 14:19:29 -0400, Seymore4Head >> <Seymore4Head@Hotmail.invalid> wrote: >> >>> Is there a way to indent everything again? >>> >>> Say I have a while statement with several lines of code and I want to >>> add a while outside that. That means indenting everything. Is there >>> a global way to do that? >> >> Ok.....so the answer is no using IDLE (Python GUI) > > This is very much an editor question, so you ought to have said *right > at the beginning* that you're using Idle's editor. > > Try selecting a bunch of text and hitting Tab. > > ChrisA > There are also indent and dedent options on the format menu. Using default settings on Windows 8.1, python 3.4.1 these are CTRL+] and CTRL+[ respectively. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | mm0fmf <none@mailinator.com> |
|---|---|
| Date | 2014-08-23 12:50 +0100 |
| Message-ID | <ie%Jv.105757$xb.45711@fx08.am4> |
| In reply to | #76813 |
On 22/08/2014 20:46, Seymore4Head wrote: > http://gvim.en.softonic.com/ Has a snazzy look, but I think it is not > compatible with Windows so it looks like I might have to try Emacs. Others will disagree but I find keeping Windows and *nix separate helps me a lot. So I'll use emacs on Linux for C++/Python/Tcl and VisualStudio / NotePad++ on Windows. Using Windows style editors on Windows just seems to be easier, whenever I try emacs on Windows it doesn't feel right and I start thinking more about the editor and less about what is being edited. You may be comfortable with emacs on Windows but part of my job is producing C++ and C# code for Windows so VisualStudio is the order of the day and so using NotePad++ for Python works for me. YMMV Andy
[toc] | [prev] | [next] | [standalone]
| From | Simon Ward <simon@bleah.co.uk> |
|---|---|
| Date | 2014-08-22 20:22 +0100 |
| Message-ID | <mailman.13304.1408737561.18130.python-list@python.org> |
| In reply to | #76805 |
On 22 August 2014 19:44:39 BST, "Neil D. Cerutti" <neilc@norwich.edu> wrote: >This sort of simple task [indenting blocks of text] is why fancy text editors were invented. > >I use and recommend gvim (press > in select mode using the standard >python plugin), but there are plenty of options out there. Even without the Python add-on this should work. It shifts the text based on the 'shiftwidth' setting. I vaguely remember using some other editors (one or more of Nedit, Gedit, Kate, Notepad++, Eclipse) that use, or can be configured to use, the tab key to indent selected text rather than replacing it with a tab character. Shift-tab probably out dented too. Simon -- Sent from Kaiten Mail. Please excuse my brevity.
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2014-08-23 18:12 +1000 |
| Message-ID | <53f84cd8$0$29972$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #76805 |
Seymore4Head wrote: > Is there a way to indent everything again? > > Say I have a while statement with several lines of code and I want to > add a while outside that. That means indenting everything. Is there > a global way to do that? In kwrite, kate, geany, and any other sensible editor, you select the text you want to indent and press the tab key. If your editor is not sensible, it may replace the entire block of text with a single tab. In that case, hit Ctrl-Z, or Undo from the Edit menu, and your text will be returned. In that case, check the menu commands offered by your editor, especially the Edit and Tools menu (if it has a Tools menu). In kwrite, I find Indent and Unindent commands under Tools. In geany, I find Increase Indent and Decrease Indent under Edit>Commands submenu. (In case your editor is not only not sensible, but out-and-out microcephalic, I suggest you try it on a sample piece of text first, in case it does not allow you to undo.) -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Seymore4Head <Seymore4Head@Hotmail.invalid> |
|---|---|
| Date | 2014-08-23 11:10 -0400 |
| Message-ID | <9jbhv9lnjp2gf26l4l6sq3d6hcj47ug1tm@4ax.com> |
| In reply to | #76805 |
On Fri, 22 Aug 2014 14:19:29 -0400, Seymore4Head <Seymore4Head@Hotmail.invalid> wrote: >Is there a way to indent everything again? > >Say I have a while statement with several lines of code and I want to >add a while outside that. That means indenting everything. Is there >a global way to do that? I did two things. I decided to skip trying a second level of while loops for the moment. I also took a block of text and highlighted it and then pushed tab. It worked. Thanks everyone
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.python
csiph-web