Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76805 > unrolled thread

Global indent

Started bySeymore4Head <Seymore4Head@Hotmail.invalid>
First post2014-08-22 14:19 -0400
Last post2014-08-23 11:10 -0400
Articles 20 on this page of 35 — 19 participants

Back to article view | Back to comp.lang.python


Contents

  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 1 of 2  [1] 2  Next page →


#76805 — Global indent

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2014-08-22 14:19 -0400
SubjectGlobal indent
Message-ID<tl1fv9di31uj2mq87u5mpudqjql2o5bvbv@4ax.com>
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?

[toc] | [next] | [standalone]


#76806

FromSkip Montanaro <skip@pobox.com>
Date2014-08-22 13:34 -0500
Message-ID<mailman.13299.1408732472.18130.python-list@python.org>
In reply to#76805
On Fri, Aug 22, 2014 at 1:19 PM, Seymore4Head
<Seymore4Head@hotmail.invalid> wrote:
> 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?

Depends on your text editor/IDE. In Emacs using either python-mode.el
or python.el, I use C-c > to shift the selected region right, C-c < to
shift it left. Other editors probably have similar commands.

Skip

[toc] | [prev] | [next] | [standalone]


#76807

From"Neil D. Cerutti" <neilc@norwich.edu>
Date2014-08-22 14:44 -0400
Message-ID<mailman.13300.1408733106.18130.python-list@python.org>
In reply to#76805
On 8/22/2014 2:19 PM, 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?

This sort of simple task 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.

-- 
Neil Cerutti



[toc] | [prev] | [next] | [standalone]


#76809

FromDan Stromberg <drsalists@gmail.com>
Date2014-08-22 12:21 -0700
Message-ID<mailman.13301.1408735308.18130.python-list@python.org>
In reply to#76805
On Fri, Aug 22, 2014 at 11:44 AM, Neil D. Cerutti <neilc@norwich.edu> wrote:
> On 8/22/2014 2:19 PM, 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?
>
>
> This sort of simple task 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.

Here's another way of saying it (for vi or vim or other vi clone):
1) Go to the top of the region you want to indent.
2) Type "ma" in command mode to set a mark named "a".
3) Go to the bottom of the region you want to indent.
4) Type >'a to indent, one level, everything between the mark named
"a" and the cursor

HTH

[toc] | [prev] | [next] | [standalone]


#76813

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2014-08-22 15:46 -0400
Message-ID<bt6fv9djhcv0h5jauao5dij7urmgteoa53@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?

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.

Thanks everyone

[toc] | [prev] | [next] | [standalone]


#76814

FromRob Gaddi <rgaddi@technologyhighland.invalid>
Date2014-08-22 12:54 -0700
Message-ID<20140822125414.1fe9eb5c@rg.highlandtechnology.com>
In reply to#76813
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.
> 
> 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.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.

[toc] | [prev] | [next] | [standalone]


#76819

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-08-22 23:11 +0300
Message-ID<87oavc9tde.fsf@elektro.pacujo.net>
In reply to#76814
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.
That's how I learned it in the 1980's and didn't experience any learning
curve.

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.


Marko

[toc] | [prev] | [next] | [standalone]


#76855

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2014-08-23 19:08 +1000
Message-ID<53f859fb$0$29983$c3e8da3$5496439d@news.astraweb.com>
In reply to#76819
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???

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, если вы знаете, что я имею
в виду.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#76858

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-08-23 12:32 +0300
Message-ID<87egw78saj.fsf@elektro.pacujo.net>
In reply to#76855
Steven D'Aprano <steve+comp.lang.python@pearwood.info>:

> Marko Rauhamaa wrote:
>> 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.

You see, I tend to read even the assembly instructions of Ikea furniture
and the user manual of a dryer.

More frustrating than having to read a well-thought-out manual is

 * not being able to accomplish something

 * not having any manual

For example, I never "got" Eclipse despite having to use it for two
years.

>> 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

No, I just worked through the tutorial. It was fascinating and only took
a couple of hours IIRC. That's the way learned almost everything
(including Python).

> I just started up emacs, [...]
> Well, that's just bizarre.

I'm not making you use emacs, you know.


Marko

[toc] | [prev] | [next] | [standalone]


#76859

FromChristian Gollwitzer <auriocus@gmx.de>
Date2014-08-23 11:41 +0200
Message-ID<lt9nl3$gkh$1@dont-email.me>
In reply to#76855
Am 23.08.14 11:08, schrieb Steven D'Aprano:
> 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.
>
 > [...] (lots of frustrating user experience deleted)

 >
> This is the moment that I decide to give up on Emacs and take up something
> trivial in comparison, like being a Soyuz pilot, если вы знаете, что я имею
> в виду.

Well done, Steve! This is the exact reason that I do not recommend gvim 
to anybody, who asks me an editor question, though I use it myself for 
practically any text editing task.  (I'm pretty sure you did that C-f 
... thing on purpose to make your point clear. and that you actually 
understand it was meant to represent pressing Ctrl-key).

There are ways to put these editors into Beginner's mode, for vim there 
is "evim", and for sure emacs has something similar, where the editor 
behaves more like you expect. In evim, this means you can't go to 
command mode, and you need to use the menus and toolbars to save/load 
text. But if you do that, you also loose the functionality that comes 
from the command mode - it's actually better to recommend Notepad++ or kate.

Sometimes I impress my colleagues with what they call "magic", i.e. 
creating special repeated lists of numbers by a few keystrokes in gvim, 
and that has triggered the request from them to learn a bit of (g)vim. 
But when they asked me, which editor they should use, I pointed them to 
kate.

	Christian

[toc] | [prev] | [next] | [standalone]


#76870

FromJoshua Landau <joshua@landau.ws>
Date2014-08-23 15:19 +0100
Message-ID<mailman.13343.1408803618.18130.python-list@python.org>
In reply to#76859
(Since this is already an editor war...)

On 23 August 2014 10:41, Christian Gollwitzer <auriocus@gmx.de> wrote:
> Sometimes I impress my colleagues with what they call "magic", i.e. creating
> special repeated lists of numbers by a few keystrokes in gvim, and that has
> triggered the request from them to learn a bit of (g)vim.

I have yet to be truly impressed by Vim, in that Sublime Text with a
few extensions seems to do the same things just as easily. I find that
Vim and Emacs users consistently underrate the powers of these
editors, presumably because they've never put nearly as much effort
into them as they have into their Vim or Emacs.

For example, to make a numbered list in (my) Sublime Text (fully
custom shortcuts ahead):

Alt-1 Alt-0 Alt-0   to repeat the next command 100 times
Enter               to insert 100 new lines, so 101 in total
Ctrl-A              to select all text (can be done more fancily, but
keep this simple for now)
Ctrl-l              to select lines (creates multiple selections),
ignoring the blank end of selection
$:                  to write some text
Ctrl-Shift-Home     to select to beginning of line
Ctrl-e              to replace $ with consecutive numbers (also
supports using Python's {} with all of its formatting options)

With an increment function and macros:

1:                  to write some text
Ctrl-q              to start macro recording
Ctrl-d              to duplicate line (and select it)
Left                to go to start of selection
INCREMENT           to increment number (emulated by evaluating
"1+number" with Python [1, +, Ctrl-left, Shift-Home, Ctrl-Shift-e])
Ctrl-q              to finish macro recording
Alt-1 Alt-0 Alt-0   to repeat the next command 100 times
Ctrl-Shift-q        to repeat macro

Compare with Vim:
http://stackoverflow.com/questions/4224410/macro-for-making-numbered-lists-in-vim

[toc] | [prev] | [next] | [standalone]


#76878

FromChristian Gollwitzer <auriocus@gmx.de>
Date2014-08-23 18:17 +0200
Message-ID<ltaerg$ihl$1@dont-email.me>
In reply to#76870
Am 23.08.14 16:19, schrieb Joshua Landau:
> (Since this is already an editor war...)
>
> On 23 August 2014 10:41, Christian Gollwitzer <auriocus@gmx.de> wrote:
>> Sometimes I impress my colleagues with what they call "magic", i.e. creating
>> special repeated lists of numbers by a few keystrokes in gvim, and that has
>> triggered the request from them to learn a bit of (g)vim.
>
> I have yet to be truly impressed by Vim, in that Sublime Text with a
> few extensions seems to do the same things just as easily. I find that
> Vim and Emacs users consistently underrate the powers of these
> editors, presumably because they've never put nearly as much effort
> into them as they have into their Vim or Emacs.

I never looked into Sublime, because it costs money. But no doubt it is 
a powerful editor, judging from comments of other people.

>
> For example, to make a numbered list in (my) Sublime Text (fully
> custom shortcuts ahead):
>
> Alt-1 Alt-0 Alt-0   to repeat the next command 100 times

 > [ ... some keystrokes ...]
>
> Ctrl-Shift-q        to repeat macro
>
> Compare with Vim:
> http://stackoverflow.com/questions/4224410/macro-for-making-numbered-lists-in-vim
>

I'd actually do this in gvim to put numbers at each line:

- Select text (by mouse, or v + cursor movements)
- ! awk '{print NR ". " $0}'

Yes, it is cheating, it pipes the selected text through an external 
tool. But why should I do the tedious exercise of constructing an editor 
macro, when an external tool like awk can do the same so much easier?

	Christian

[toc] | [prev] | [next] | [standalone]


#76900

FromJoshua Landau <joshua@landau.ws>
Date2014-08-23 21:57 +0100
Message-ID<mailman.13355.1408827519.18130.python-list@python.org>
In reply to#76878
On 23 August 2014 17:17, Christian Gollwitzer <auriocus@gmx.de> wrote:
> Am 23.08.14 16:19, schrieb Joshua Landau:
>>
>> On 23 August 2014 10:41, Christian Gollwitzer <auriocus@gmx.de> wrote:
>>>
>>> Sometimes I impress my colleagues with what they call "magic", i.e.
>>> creating
>>> special repeated lists of numbers by a few keystrokes in gvim, and that
>>> has
>>> triggered the request from them to learn a bit of (g)vim.
>>
>>
>> I have yet to be truly impressed by Vim, in that Sublime Text with a
>> few extensions seems to do the same things just as easily. I find that
>> Vim and Emacs users consistently underrate the powers of these
>> editors, presumably because they've never put nearly as much effort
>> into them as they have into their Vim or Emacs.
>
>
> I never looked into Sublime, because it costs money. But no doubt it is a
> powerful editor, judging from comments of other people.

Ay, so is any editor with an API. I use Sublime mostly because it's
pretty, fast and has a Python-based API. The only actual feature it
has that some others don't is multiple selections, and even then a lot
do.

My point is more about how using Emacs or Vim and having a powerful
editor is mostly the symptom of the same thing, not a causal relation.

>> For example, to make a numbered list in (my) Sublime Text (fully
>> custom shortcuts ahead):
>>
>> [ ... some keystrokes ...]
>
> I'd actually do this in gvim to put numbers at each line:
>
> - Select text (by mouse, or v + cursor movements)
> - ! awk '{print NR ". " $0}'
>
> Yes, it is cheating, it pipes the selected text through an external tool.
> But why should I do the tedious exercise of constructing an editor macro,
> when an external tool like awk can do the same so much easier?

Because it normally happens more like this:

Move to copy something that I wish to postfix with a number
Ctrl-d a few times to select copies of that fragment
Write $ and select it
Press Ctrl-e to turn "$"s into numbers

Luckily that one doesn't happen too often either because numbering
things sequentially is better left to loops. The key binding is
primarily used for evaluating snippets of code inline.

[toc] | [prev] | [next] | [standalone]


#76905

FromRustom Mody <rustompmody@gmail.com>
Date2014-08-23 14:55 -0700
Message-ID<15dab73b-90df-45f0-b75b-a6a0a4f7a4e9@googlegroups.com>
In reply to#76900
On Sunday, August 24, 2014 2:27:56 AM UTC+5:30, Joshua Landau wrote:

> Ay, so is any editor with an API. I use Sublime mostly because it's
> pretty, fast and has a Python-based API. The only actual feature it
> has that some others don't is multiple selections, and even then a lot
> do.

You mean this?
http://emacsrocks.com/e13.html

[toc] | [prev] | [next] | [standalone]


#76938

FromJoshua Landau <joshua@landau.ws>
Date2014-08-24 20:24 +0100
Message-ID<mailman.13382.1408908299.18130.python-list@python.org>
In reply to#76905
On 23 August 2014 22:55, Rustom Mody <rustompmody@gmail.com> wrote:
> On Sunday, August 24, 2014 2:27:56 AM UTC+5:30, Joshua Landau wrote:
>
>> Ay, so is any editor with an API. I use Sublime mostly because it's
>> pretty, fast and has a Python-based API. The only actual feature it
>> has that some others don't is multiple selections, and even then a lot
>> do.
>
> You mean this?
> http://emacsrocks.com/e13.html

Yup.

[toc] | [prev] | [next] | [standalone]


#76875

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2014-08-24 00:56 +1000
Message-ID<53f8ab8b$0$29999$c3e8da3$5496439d@news.astraweb.com>
In reply to#76859
Christian Gollwitzer wrote:

> Am 23.08.14 11:08, schrieb Steven D'Aprano:
>> This is the moment that I decide to give up on Emacs and take up
>> something trivial in comparison, like being a Soyuz pilot, если вы
>> знаете, что я имею в виду.
> 
> Well done, Steve! This is the exact reason that I do not recommend gvim
> to anybody, who asks me an editor question, though I use it myself for
> practically any text editing task.  (I'm pretty sure you did that C-f
> ... thing on purpose to make your point clear. and that you actually
> understand it was meant to represent pressing Ctrl-key).

Of course I did, but only because I've been a Linux user and programmer for
about 15 years now. Except for Emacs, the rest of the world says Ctrl-F (or
Command-F if you have a Mac), and use it to mean Find. Emacs is a universe
of its own, but you can hardly be a Linux programmer without coming across
Emacs terminology enough to at least recognise it.


> There are ways to put these editors into Beginner's mode, for vim there
> is "evim", and for sure emacs has something similar, where the editor
> behaves more like you expect. In evim, this means you can't go to
> command mode, and you need to use the menus and toolbars to save/load
> text. But if you do that, you also loose the functionality that comes
> from the command mode - it's actually better to recommend Notepad++ or
> kate.

Despite my comments, I don't actually have any objection to people who
choose to use Emacs, or Vim, or edit their text files by poking the hard
drive platter with a magnetised needle if they prefer :-) But I do think
it's silly of them to claim that Emacs has no learning curve, or to fail to
recognise how unfamiliar and different the UIs are compared to nearly
everything else a computer user is likely to be familiar with in 2014.

I'm especially annoyed and/or amused by the tendency of many people to
assume that there are only three editors: Emacs, Vim (one of which is used
by all right-thinking people, the other being sent by the Devil to tempt us
from righteousness) and Notepad (which is used only by the most primitive,
deprived savages who are barely capable of bashing out "Hello World" using
one finger). Besides, ed is the one true editor *wink*

My own feeling is that Emacs and/or Vim very likely are extraordinarily
powerful, and for those who want to take the time and effort to become
proficient they can probably solve certain editing tasks more quickly than
I can. But that's okay: I suspect that they're optimizing for the wrong
things, or at least things for which I personally have no interest in
optimizing: while they can probably replace the third letter of every
second word in all sentences beginning with W ten times faster than I can,
that's hardly a bottleneck in my world. I've watched touch-typing Vim
users, and they can pound the keys much faster than me, but that seems to
mean that they just make mistakes faster than me. (Possibly unfair, since
everyone probably loses accuracy when being watched. But still, it's the
only data I have.)

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.

But, to each their own.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#76877

FromChristian Gollwitzer <auriocus@gmx.de>
Date2014-08-23 18:09 +0200
Message-ID<ltaebd$f2s$1@dont-email.me>
In reply to#76875
Hi Steven,

I agree with all you said.

Am 23.08.14 16:56, schrieb Steven D'Aprano:
> Christian Gollwitzer wrote:
>> There are ways to put these editors into Beginner's mode, for vim there
>> is "evim", and for sure emacs has something similar, where the editor
>> behaves more like you expect. In evim, this means you can't go to
>> command mode, and you need to use the menus and toolbars to save/load
>> text. But if you do that, you also loose the functionality that comes
>> from the command mode - it's actually better to recommend Notepad++ or
>> kate.
>
> I'm especially annoyed and/or amused by the tendency of many people to
> assume that there are only three editors: Emacs, Vim (one of which is used
> by all right-thinking people, the other being sent by the Devil to tempt us
> from righteousness) and Notepad (which is used only by the most primitive,
> deprived savages who are barely capable of bashing out "Hello World" using
> one finger).

Just in case that was misleading: Notepad++ is a different editor than 
Notepad:

	http://notepad-plus-plus.org/

This one I actually recommend to people on Windows, who ask me, which 
editor should they use.

	Christian

[toc] | [prev] | [next] | [standalone]


#76906

FromAnders Wegge Keller <wegge@wegge.dk>
Date2014-08-23 22:43 +0200
Message-ID<mailman.13359.1408831344.18130.python-list@python.org>
In reply to#76875
On Sun, 24 Aug 2014 00:56:11 +1000
Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:

> Despite my comments, I don't actually have any objection to people who
> choose to use Emacs, or Vim, or edit their text files by poking the hard
> drive platter with a magnetised needle if they prefer :-) But I do think
> it's silly of them to claim that Emacs has no learning curve, or to fail to
> recognise how unfamiliar and different the UIs are compared to nearly
> everything else a computer user is likely to be familiar with in 2014.

 Really, they don't! At least not for the people, for whom they are
necessary tools. When I started in my present job, "remote access" was
a dial-up modem, that could do 2400 baud, if you were lucky[1]. With such a
shitty connection, a text-only editor is indisputably the right thing. 

 Curiously enough, even today the same lousy kind of connections prevail. We
still have a sizeable modem bank at my job. We still do our remote support
over a telnet/ssh session. And we still are unable to reliable get the 
connection speeds[2], that would make anything with a GUI remotely
pleasant. 

 So emacs and vim still have their niches. Those of us, who are old enough
to have started our first job in a glorified teletype, OR have to support
systems that are only reachable over RFC-1149 quality datalinks, belong
there. The rest of you would probably be better off with something nicer.

1. Meaning a real switched landline all the way from Denmark to Tokyo.
Ending up with two satellite up/down-links was a killer.

2. We have an installation in the Philippines, where we ended up installing a
   satellite uplink. It feels like we have doubled the connectivity of the
   entire Manilla area by doing so. And it's still painfully slow.

-- 
//Wegge

[toc] | [prev] | [next] | [standalone]


#76910

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-08-24 01:50 +0300
Message-ID<87zjeu6csl.fsf@elektro.pacujo.net>
In reply to#76906
Anders Wegge Keller <wegge@wegge.dk>:

>  Curiously enough, even today the same lousy kind of connections
> prevail. We still have a sizeable modem bank at my job. We still do
> our remote support over a telnet/ssh session. And we still are unable
> to reliable get the connection speeds[2], that would make anything
> with a GUI remotely pleasant.

I do emacs over SSH terminal connections all the time both for business
and pleasure. I have occasionally even run the SSH connection (and
emacs) from my cell phone.

The connections aren't all that lousy, but I wouldn't run X11 over them.
Rdesktop is ok but not nearly as convenient as a terminal connection.


Marko

[toc] | [prev] | [next] | [standalone]


#76896

FromTim Chase <python.list@tim.thechases.com>
Date2014-08-23 15:18 -0500
Message-ID<mailman.13352.1408825229.18130.python-list@python.org>
In reply to#76859
On 2014-08-23 15:19, Joshua Landau wrote:
> I have yet to be truly impressed by Vim, in that Sublime Text with a
> few extensions seems to do the same things just as easily

Can it be run remotely in a tmux session which can be accessed via
SSH from multiple machines? ;-)

Using the command-line:  it's a terminal condition.

-tkc




[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.python


csiph-web