On Nov 11, 3:24 pm, Tony Mechelynck <[EMAIL PROTECTED]>
wrote:
> On 10/11/08 22:22, Britton Kerin wrote:
>
>
>
> > I've been madly remapping vim keys to suit my crazy
> > notions of the most speedy and ergonomic possible
> > arrangements.  I'm *extremely* impressed with the
> > graceful and detailed control vim gives you in
> > this department.  I have one mapping that doesn't work
> > as expected though:
>
> >      cnoremap js<Esc>
>
> > which if I understand correctly is supposed to make 'js'
> > do what Esc does when typed on the command line.  But it
> > seems to do something slightly different:
>
> >      :boguscommandjs
>
> > results in an error message:
>
> >      E492: Not an editor command: boguscommand
>
> > while
>
> >      :boguscommand<Esc>
>
> > appears to just silently abort the command line.
>
> Well, even if it worked, you should be careful: what about
>
>         :e scriptname.js
>
> ? (I don't write javascript myself, except that user.js and prefs.js are
> names for preference files used by Mozilla applications.)

LOL I already hit the javascript issue.  Otherwise for english I get:

    my_system$ grep 'js' /usr/share/dict/american-english
    Ijssel
    Ijsselmeer
    Ijsselmeer's

which doesn't seem like much of a problem, and for C code:

    my_system$ cd dir_full_of_many_blobs_of_code
    my_system$ find . -name "*.c" -exec grep 'js' \{\} \; | wc -l
    320
    my_system$ find . -name "*.c" -exec grep '' \{\} \; | wc -l
    1686914

or about 0.019% of lines, making in pretty unpopular in identifiers
too.  And lets face it, if you're working with the ghastly monstrosity
that is DOM/JavaScript, you're going to be pretty darn annoyed
anyway :)

Why vim (O'Reilly et. al.) chooses to advertise Esc everywhere
mystifies me.
At least given where Esc falls on modern keyboards.  Its about like
emacs
having the backspace key launch you into help by default.  Takes an
editor
for which ergonomics is a key advantage and make it look...  strangely
clunky.

Britton

>
>
>
>
>
> > I don't think I have any other mappings that should interfere
> > here, but just in case I've attached my .vimrc.  Here are all
> > the mapping commands I have in it:
>
> > " Fine point: we don't make these mappings in operator pending mode.
> > This
> > " the timeout on the ds map to delete upward with movement via s).
> > nnoremap s k
> > vnoremap s k
> > nnoremap ds s
> > vnoremap ds s
> > "nmap js<Nop>
> > " Including a trailing space in the "to" part of these mappings has an
> > onoremap js<Esc>
> > xnoremap js<Esc>
> > snoremap js<Esc>
> > inoremap js<Esc>
> > cnoremap js<Esc>
> > " This was the old mapping I used, maintained until new mapping is
> > learned.
> > inoremap jf<Esc>
> > noremap<Space>  h
> > noremap , ;
> > :noremap ;w<C-w>w
> > noremap ;s :sh<CR>
> > ":noremap ' `
> > inoremap {      {}<Left>
> > inoremap {<CR>   {<CR>}<Esc>O
> > inoremap {{     {
>
> Here you may have to hit the { key six times to create a {{{ fold-marker
> (in a file using foldmethod=marker and the default markers)
>
> > inoremap {}     {}
> > "inoremap (      ()<Left>
> > "inoremap (<CR>   (<CR>)<Esc>O
> > "inoremap ((     (
> > "inoremap ()     ()
> > "inoremap [      []<Left>
> > "inoremap [<CR>   [<CR>]<Esc>O
> > "inoremap [[     [
> > "inoremap []     []
>
> > Thanks in advance for any help,
> > Britton
>
> Well, my help (or rather, my recommendation) is: learn how Vim behaves
> natively, it's often more productive than trying to force it to behave
> like Netscape, Emacs, gobbledywriter or anything.
>
> Best regards,
> Tony.
> --
> 186,282 miles per second:
>
> It isn't just a good idea, it's the law!
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to