Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Editing features for power users

by maverick (Curate)
on Jan 27, 2002 at 00:58 UTC ( [id://141833]=note: print w/replies, xml ) Need Help??


in reply to Re: Editing features for power users
in thread Editing features for advanced users

vim has most of the features you're asking for:
  • Autoindent: :set smartindent will turn it on
  • Block cut and paste: there are SEVERAL command sequences for this. You could:
    • position the cursor at the start of the block press ma (set a mark named a at this line)
    • move to some other line press y'a (yank / copy from this line to mark a) or d'a (delete / cut from this line to mark a)
    • then move to the line you want insert those copied or cut lines and press p (paste).
    as for between other apps, copy or cutting goes to the windows clipboard and mouse highlighting will copy to the X buffer.
  • gvim supports this:
    • CTRL-W N splits the current window horizontally. (think: Control Window New)
    • CTRL-W J moves the focus to the window below
    • CTRL-W K moves the focus to the window above
    • :q (or another exit command) will close the current window
    • you can cut / paste between any of the windows
  • Jump to specific line number:
    • :(number)
    • :.+10 ten lines below the current one
    • :$ last line of the file
    • :$-5 5 lines before last line of file
  • Umm...regex find and replace. hello? :) you can also have it prompt per each replacment by adding c after the closing / on the replacement
A very large part of the appeal for me is that my hands never leave the home keys regardless of the task I'm performing. I even mapped the escape key to ALT so that I didn't have to reach for it.

HTH

/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"

  • Comment on Re: Re: Editing features for power users

Replies are listed 'Best First'.
Re: Re: Re: Editing features for power users
by jlongino (Parson) on Jan 27, 2002 at 01:42 UTC
    Thanks for taking the time to reply. I was pretty sure vi, vim, and gvim could meet my short list, probably my longer list too. I'm not so sure, at least from what I've read in this thread and my limited exposure to vi, that they fit the bill as far as short learning curve and familiar keyboard shortcuts (afraid the command/edit mode ":" annoyance is something I just can't get past).

    As for regex-like find/replace? I don't really like regex at all, and don't particularly want to learn two different flavors. Don't get me wrong, with Perl it is a wonderful and efficient tool for people who like it, need it and too rarely use it correctly, I just usually don't (like, need, or use it correctly ;-). On the rare occasions that I do need it, I use it appreciatively, but to use a different flavor of it regularly for editor find/replace? Er, no thanx.

    --Jim

    re:  Screamer++, fair enough!

      You can use regexes to search and replace - doesn't mean you have to. :-)

      Makeshifts last the longest.

Re^3: Editing features for power users
by hiseldl (Priest) on Mar 24, 2003 at 20:07 UTC

      I even mapped the escape key to ALT so that I didn't have to reach for it.

    You can just use CTRL-[ to send the escape character. Your fingers never leave the home row and you don't have to mess around with alternate key mappings. You can also use this key combination to send ESC to Emacs. :-)

    Cheers!

    --
    hiseldl
    What time is it? It's Camel Time!

      Hmmm... That doesn't seem to work. '[' is AltGr-8 and CTRL and AltGr don't mix.
      How does he do it?

      Oh well - maybe it's just my keyboard - I never could locate the right Alt button either.... ;-P

        On my 101-key QWERTY keyboard the '[' key is to the right of the 'P' key. It sounds like you don't have the same keyboard as I do. 8-)

        --
        hiseldl
        What time is it? It's Camel Time!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://141833]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found