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

Alan Gauld alan.gauld at btinternet.com
Fri Aug 15 22:31:51 CEST 2008

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

> I've seen vi(m) being praised a lot, well, personally the thing that 
> I
> hate the most about vim is its directional button (khjl) which is
> unnatural

But very logical and easy to remember when you recall
that ^H was backspace (go left), and ^j was linefeed
(go down)  and the typists home position has the right hand
on ,j,k,l, (and if you use your imagination K looks a bit like
an up arrow and L like a right facing symbol - but personally
I think that's coincidental!) and shifting one position left is
an easy reach. (BTW A lot of early terminal games, especially
on Unix use the hjkl format. And so, of course does the
bash shell and more (and maybe less?) )

> touchpad and keyboard 2) the keyboard is smaller, 3) many of the 
> hotkeys
> require pressing Esc first to get out from editing/inserting mode, 
> which
> is just as inconvenient as reaching the Ctrl. And for vi(m), after 
> going
> to command/shortcut mode and pressing the shortcut, then most of the
> time you have to go back to editing mode by pressing i/a/etc, that 
> is
> much worse than the Ctrl craziness.

Remember that the default mode in vi is "editing mode" with is 
where you type commands. The mode you call editing mode is
actually insert mode and only applies for the duration of a command.
Thus it is logical, from command mode, to enter a command, enter trext
and then hit ESC to escape from insert mode back to the native
editing/command mode. You have to get used to the idea that inserting
text is not the default activity, navigating and changing text is - 
which is
what most programmers do most of the time. So a command in
vim consists of:

<cmd key>[<type text to insert/change>[<escape>]]

The good news about vim (as opposed to vi) is that you don't
need to do that nearly as often since it recognises the arrow
keys and you can do basic deletion etc while in insert mode.

But the whole point of vi/vim is that you are required to change your
way of thinking about text editing. It is a different approach in the
same way that Lisp or Prolog  or SQL are very different approaches
to programming from Python. There is no escaping the fact that
vi/vim are very powerful but only after you invest heavily in learning
their ethos. Until you do they will drive you nuts! But if you use
them regularly that only last a week or so... :-)


Alan G 

More information about the Tutor mailing list