[Tutor] What has Editor X got that PyWin32 hasn't?

Alan Gauld alan.gauld at btinternet.com
Sat Aug 16 23:42:55 CEST 2008


"Lie Ryan" <lie.1296 at gmail.com> wrote

> No offense (to you and to other vi(m) fans),

No offense taken, as I said right at the beginning of this
thread, editors are a religious battleground for
programmers and elicit very personal reactions.
Personally I use over a dozen editors on a regular basis
but only about 3 or 4 heavily - all of which are quite
different in style.

> not in their subconsciousness -- humans think visually when 
> navigating
> (up is located somewhere higher than down)[2].

Actually humans think in lots of different ways. Programmers
tend not to think visually but verbally (or more accuratelty
symbolically) which is one reason so called visual programming
environments have failed to take off!

> [2] That's why no TV remote put their buttons in this arrangements:

Some do, I used to own one (a Philips as I recall)! :-)

> they think that programmers insert texts less often than changing 
> text?
> I'm not sure, probably that's their workflow.

It's not so much "changing" its navigating. Studies have shown that
programmers spend most of their time going back over code they
have alrweady written (or someone else has) and making small
changes. Thats exactly where vi/vim excels. In fact when I used
to work exclusively on Unix I used emacs for the initial text creation
(because it is better at that) but then used vi (actually viper mode
in Xemacs) for editing changes thereafter. The best of both worlds!

> which is a waste of movement compared to modern text editor. 
> Compared to
> just clicking then typing

But you can do that in vim. It is fully mouse aware and you
can position the cursor, select text and more all with the mouse.

> should change to a laptop, in which the distance between the 
> touchpad
> and keyboard is really close (you could, sort of, say that the 
> keyboard
> and the touchpad is a singular device).

I do use a laptop but laptop pointers are universally awful in my
experience!

> I could even argue that moving the hand from the home position to
> touchpad is shorter than moving the hand from home position to Esc 
> key,
> which you have to do many times in vim.

Thats a valid point, but less so in vim.
The ESC key was originally easily within reach of the little finger
but with the introduction of PCs it has moved further away.

> text editor, you could use shift+directional[1] to select text very
> quickly, you can't do that in the almighty vim, you must instead 
> type

You can use the usual selection movements using Visual mode
in vim. drag select or shift select both work as expected

> "y(ank)-an_obscure_direction_that_is_slow_to_work_with

But no vim power user does that.
They use the navigational power of vim to jump directly
to where they want to be. As i said earlier I virtually never
use the number commands, I use the search features or
the t/f set. Thus yt<str> or yf<str> or for long sections

,./<searchstr>/y

> [1] directional isn't only up, down, left, and right, but also home,
> end, page up, page down, and ctrl+directional, most people never 
> fully
> utilize the extended directionals and instead uses the mouse (or in 
> case
> of vim users, keyboards) more than is really necessary (instead of
> balancing between keyboard and mouse usage).

And all of those movements exist in vi.vim plus quite
a few others as well - half page movements up down left and right
movement to/from a letter or regex etc etc

Its not visual and if you like visual you probably won't like vi 
(which
is ironic since vi is short for visual! - as opposed to line oriented)

> I know I can use the arrow key, but that doesn't seems to be the
> preferred choice of vim-ers when they're in editing mode (now with
> correct terminology)

Experienced users prefer hjkl purely because its faster than
stretching to the arrow keys... But beginners nearly always
use the arrow keys.

> (when I had the time I will surely approach them), I never thought 
> SQL
> as a programming language,

SQL is fully Turing complete. Some people write full business 
applications
in pure SQL. its just a different way of thinking about control flow 
etc.
Its more akin to prolog than Python.

> redundant and is pale compared to modern text-editor that do 
> acknowledge
> mouse as a primary input device.

vim does use the mouse as a primary device.
I'm confused at the comments re vim but I totally understand them
in the context of vi.

But back to what I said at the beginning, if you don't like vi./vim
there are lots of other choices and just go with the one that works
for you.

Alan g. 




More information about the Tutor mailing list