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


Groups > linux.debian.user > #186492

Editor survival [Was: Recommended editor for novice programmers?]

From Erik Christiansen <dvalin@internode.on.net>
Newsgroups linux.debian.user
Subject Editor survival [Was: Recommended editor for novice programmers?]
Date 2017-09-06 08:10 +0200
Message-ID <umBHb-5FI-5@gated-at.bofh.it> (permalink)
References <ulll8-6lO-19@gated-at.bofh.it> <umABr-4JW-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06.09.17 05:31, Nick Boyce wrote:
> I don't like to confess to my august and more sophisticated colleagues
> here how much code I've written using joe - albeit in the simpler
> languages (a variety of Bash scripts, Perl, C, HTML and similar).
> There is some syntax highlighting, but no code-completion or compiler
> integration or the other trinkets that come with proper IDEs.  It is
> however, small, fast and reliable - it hasn't had a new feature in
> *years* because for it's intended use-cases it's *feature-complete* !
> 
> It's one of the first things I install on any Linux or *BSD system.

In my decades of leading software teams, one thing I did not do is ask
"What editor do you use?", even in employment interviews. In my
experience, a programmer is most productive using the editor with which
he's most proficient. End of story.

> ... and vi's power makes light work of many tasks but it's
> as user-friendly as a cornered rat ... novices usually remember their
> first time trying to find out how to exit with a genuine shudder.

On the three occasions I've had to extract a marsupial possum from our
chimney (they're like a cat on steroids), I've armed myself with thick
leather gloves and grim determination. For vim, a cheat-sheet suffices,
and :help xxxx" or google do explain.

> A frequent vi moment for those familiar with modeless editors is to
> enter 'insert mode' (when you figure out how), type some text, and
> then try to use the arrow keys to move to a different line without
> remembering to first exit insert mode - depending on vi version,
> terminal emulation, Un*x flavour, phase of the Moon etc., the effect
> of this is that a whole bunch of weird character sequences get entered
> instead of cursor control, which you then spend the next 10 minutes
> removing again.  Ugh.

That's an xterm error, as the arrows simply produce motion even in
Insert-mode, if that's properly set up.

But Vim's Insert-mode/Normal-mode modality still requires user
awareness, either through memory or looking at the status line, with a
"set showmode" in ~/.vimrc - unless you also add something like:

" These days I expect to be out of insert mode, after a vertical move:
inoremap <Up> ^[<Up>
inoremap <Down> ^[<Down>

(The ^[ is <Escape>, entered as <Control-V><Escape> in insert mode.)

Now the Insert-mode exit is automated, so long as you use the arrow keys
for moves. (If you use hjkl for speed, then you're not a novice, by
definition.) I've left <Left> and <Right>, so I stay in Insert-mode
while on the line. It works for me, but you could remap them too.

To avoid the need to glance to the bottom of the window to check mode, I
also add:

" Cursor Appearance and behaviour:
" (Insert_Mode == Green, Normal_Mode == Red)
if &term =~ "xterm"
   let &t_SI = "\<Esc>]12;yellow\x7"
   let &t_EI = "\<Esc>]12;green\x7"
endif

So the cursor itself is a reminder. (I haven't yet found a way to have
it make coffee though, so that I always have my eyes open.)
(Colours chosen for yellow text on darkslategrey background, set in the
xterm. YTMV)

> (Yes, I do use more sophisticated GUI IDEs for anything serious, but
> that's not what OP asked for.  Also, I do realise vim is much better
> than vi.)

Even without integration in an editor, in *nix you can Control-Z out to
the command line, run make, and fg back in. I too would use whatever
editor my fingers remember.

Erik

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Recommended editor for novice programmers? Tom Browder <tom.browder@gmail.com> - 2017-09-02 20:30 +0200
  Re: Recommended editor for novice programmers? Dejan Jocic <jodejka@gmail.com> - 2017-09-02 20:40 +0200
    Re: Recommended editor for novice programmers? Mario Castelán Castro <marioxcc.MT@yandex.com> - 2017-09-02 21:10 +0200
      Re: Recommended editor for novice programmers? Gene Heskett <gheskett@shentel.net> - 2017-09-02 22:20 +0200
      Re: Recommended editor for novice programmers? Dejan Jocic <jodejka@gmail.com> - 2017-09-02 22:20 +0200
        Re: Recommended editor for novice programmers? John Hasler <jhasler@newsguy.com> - 2017-09-02 23:10 +0200
        Re: Recommended editor for novice programmers? Fred <fred@blakemfg.com> - 2017-09-03 03:00 +0200
      Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-02 22:40 +0200
        Re: Recommended editor for novice programmers? Mario Castelán Castro <marioxcc.MT@yandex.com> - 2017-09-03 03:20 +0200
      Re: Recommended editor for novice programmers? davidson@freevolt.org - 2017-09-03 00:40 +0200
        Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-03 02:50 +0200
          Re: Recommended editor for novice programmers? John Hasler <jhasler@newsguy.com> - 2017-09-03 03:00 +0200
          Re: Recommended editor for novice programmers? Dejan Jocic <jodejka@gmail.com> - 2017-09-03 03:20 +0200
            Re: Recommended editor for novice programmers? Erik Christiansen <dvalin@internode.on.net> - 2017-09-03 08:20 +0200
              Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-03 16:00 +0200
            Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-03 13:40 +0200
          Re: Recommended editor for novice programmers? Larry Dighera <LDighera@att.net> - 2017-09-03 17:40 +0200
            Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-03 17:50 +0200
              Re: Recommended editor for novice programmers? Jude DaShiell <jdashiel@panix.com> - 2017-09-03 18:10 +0200
        Re: Recommended editor for novice programmers? Mario Castelán Castro <marioxcc.MT@yandex.com> - 2017-09-03 03:40 +0200
          Re: Recommended editor for novice programmers? Larry Dighera <LDighera@att.net> - 2017-09-03 18:10 +0200
  Re: Recommended editor for novice programmers? Cindy-Sue Causey <butterflybytes@gmail.com> - 2017-09-02 20:50 +0200
    Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-02 22:30 +0200
      Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-02 22:40 +0200
  Re: Recommended editor for novice programmers? The Wanderer <wanderer@fastmail.fm> - 2017-09-02 21:10 +0200
    Re: Recommended editor for novice programmers? solitone <solitone@mail.com> - 2017-09-03 20:50 +0200
      Re: Recommended editor for novice programmers? <tomas@tuxteam.de> - 2017-09-03 21:10 +0200
      Re: Recommended editor for novice programmers? Dejan Jocic <jodejka@gmail.com> - 2017-09-03 21:40 +0200
        Re: Recommended editor for novice programmers? John Hasler <jhasler@newsguy.com> - 2017-09-03 21:50 +0200
        Re: Recommended editor for novice programmers? solitone <solitone@mail.com> - 2017-09-04 15:50 +0200
  Re: Recommended editor for novice programmers? Joe <joe@jretrading.com> - 2017-09-02 21:30 +0200
  Re: Recommended editor for novice programmers? davidson@freevolt.org - 2017-09-03 00:00 +0200
  Re: Recommended editor for novice programmers? Doug <dmcgarrett@optonline.net> - 2017-09-03 04:30 +0200
    Re: Recommended editor for novice programmers? "James H. H. Lampert" <jamesl@touchtonecorp.com> - 2017-09-04 17:50 +0200
      Re: Recommended editor for novice programmers? rhkramer@gmail.com - 2017-09-04 23:30 +0200
        Re: Recommended editor for novice programmers? The Wanderer <wanderer@fastmail.fm> - 2017-09-04 23:40 +0200
  Re: Recommended editor for novice programmers? soyeomul@doraji.xyz (Byung-Hee HWANG (황병희, 黃炳熙)) - 2017-09-03 12:10 +0200
    Re: Recommended editor for novice programmers? Tom Browder <tom.browder@gmail.com> - 2017-09-03 13:00 +0200
  Re: Recommended editor for novice programmers? Tom Dial <tddial@comcast.net> - 2017-09-03 20:50 +0200
  Re: Recommended editor for novice programmers? Ben Caradoc-Davies <ben@transient.nz> - 2017-09-03 23:50 +0200
    Re: Recommended editor for novice programmers? Zenaan Harkness <zenaan@freedbms.net> - 2017-09-04 01:30 +0200
  Re: Recommended editor for novice programmers? Morten Bo Johansen <mbj@spamcop.net> - 2017-09-04 18:00 +0200
  Re: Recommended editor for novice programmers? kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2017-09-06 06:00 +0200
  Re: Recommended editor for novice programmers? Nick Boyce <nick@steelyglint.org> - 2017-09-06 07:00 +0200
    Editor survival [Was: Recommended editor for novice programmers?] Erik Christiansen <dvalin@internode.on.net> - 2017-09-06 08:10 +0200
      Re: Editor survival [Was: Recommended editor for novice  programmers?] Nick Boyce <nick@steelyglint.org> - 2017-09-08 04:20 +0200
        Re: Editor survival [Was: Recommended editor for novice  programmers?] Jude DaShiell <jdashiel@panix.com> - 2017-09-08 09:40 +0200
        Re: Editor survival [Was: Recommended editor for novice programmers?] David Wright <deblis@lionunicorn.co.uk> - 2017-09-08 23:20 +0200
          Re: Editor survival [Was: Recommended editor for novice programmers?] Zenaan Harkness <zenaan@freedbms.net> - 2017-09-10 06:00 +0200
    Re: Recommended editor for novice programmers? Ben Finney <bignose@debian.org> - 2017-09-06 08:20 +0200
      Re: Recommended editor for novice programmers? <tomas@tuxteam.de> - 2017-09-06 10:20 +0200
        Re: Recommended editor for novice programmers? Gene Heskett <gheskett@shentel.net> - 2017-09-06 15:10 +0200
          Re: Recommended editor for novice programmers? "Gian Uberto Lauri" <saint@eng.it> - 2017-09-06 15:10 +0200
            Re: Recommended editor for novice programmers? Richard Owlett <rowlett@cloud85.net> - 2017-09-06 17:30 +0200
      Re: Recommended editor for novice programmers? Nick Boyce <nick@steelyglint.org> - 2017-09-08 04:30 +0200
        Re: Recommended editor for novice programmers? David Wright <deblis@lionunicorn.co.uk> - 2017-09-08 23:20 +0200
          top that shows "Web Content" (was Re: Recommended editor for novice programmers?) rhkramer@gmail.com - 2017-09-08 23:50 +0200
            Re: top that shows "Web Content" (was Re: Recommended editor for  novice programmers?) David Wright <deblis@lionunicorn.co.uk> - 2017-09-09 02:10 +0200
              Re: top that shows "Web Content" (was Re: Recommended editor for novice programmers?) rhkramer@gmail.com - 2017-09-09 13:50 +0200
                Re: top that shows "Web Content" (was Re: Recommended editor for  novice programmers?) Nick Boyce <nick@steelyglint.org> - 2017-09-10 05:00 +0200
                Re: top that shows "Web Content" (was Re: Recommended editor for novice programmers?) rhkramer@gmail.com - 2017-09-10 14:00 +0200
          Re: Recommended editor for novice programmers? Zenaan Harkness <zenaan@freedbms.net> - 2017-09-10 05:50 +0200
    Re: Recommended editor for novice programmers? "Gian Uberto Lauri" <saint@eng.it> - 2017-09-06 11:00 +0200
      Re: Recommended editor for novice programmers? Johann Spies <johann.spies@gmail.com> - 2017-09-06 11:20 +0200
        Re: Recommended editor for novice programmers? Ben Finney <bignose@debian.org> - 2017-09-06 20:20 +0200
          Re: Recommended editor for novice programmers? Gary Roach <gary719_list1@verizon.net> - 2017-09-07 01:10 +0200
            Re: Recommended editor for novice programmers? Joel Roth <joelz@pobox.com> - 2017-09-09 02:40 +0200
              Re: Recommended editor for novice programmers? Curt <curty@free.fr> - 2017-09-09 18:30 +0200

csiph-web