I often need to type out a line that looks something like the
following:

    foo(['abc'])

To do so, I might literally type the following:

  * foo
  * ()
  * <Left-Arrow>
  * []
  * <Left-Arrow>
  * ''
  * <Left-Arrow>
  * abc

This is a habit I got into a long time ago: always type both the
opening and closing of something before typing what goes inside it.
This has been quite helpful for me when writing deeply nested lists of
lists, hashes of hashes, and so on.

Anyway, after typing that line, my cursor is left at the end of the
"abc". To finish the line and start the next one, I'm seem to be stuck
doing "<Esc> A <Return>" all the time.

It doesn't seem like Vim should require me to do so much work. What's
the most optimized way to use Vim to type that line above?

Finally, since this is probably on-topic for this post, does Vim
support electric brackets? That would save me a number of visits to my
left arrow key, though still wouldn't get me out of that "<Esc> A"
required at the end.

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to