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.)
>
>
> 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
-~----------~----~----~----~------~----~------~--~---