Proper way to iunmap

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Proper way to iunmap

Tim Johnson-3
Using vim 7.2 Huge version with GTK2 GUI on Ubuntu 10.04

I'd like to make use of ~/.vim/ftplugin/php/php.vim - that is, the
php.vim that is included in the `piv' package. There is much to
recommend it, however, the following characters: ({["' are remapped
in php.vim and they interfere with my own imapping.

I can go into that file and remove the inoremap statements, but that
seems kind of crude (to me). Can anyway recommend a more
'professional' or 'vimish' way to do so?

thanks
--
Tim
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Proper way to iunmap

Gary Johnson-4
On 2010-09-21, Tim Johnson wrote:

> Using vim 7.2 Huge version with GTK2 GUI on Ubuntu 10.04
>
> I'd like to make use of ~/.vim/ftplugin/php/php.vim - that is, the
> php.vim that is included in the `piv' package. There is much to
> recommend it, however, the following characters: ({["' are remapped
> in php.vim and they interfere with my own imapping.
>
> I can go into that file and remove the inoremap statements, but that
> seems kind of crude (to me). Can anyway recommend a more
> 'professional' or 'vimish' way to do so?

You could put unmap commands in ~/.vim/after/ftplugin/php.vim.
That's what I've done for other file types.  For example:

    if strlen(maparg("}", "i"))
        iunmap }
    endif

Testing for the existence of the mapping first avoids error messages
if the mapping has not already been defined.

HTH,
Gary

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Proper way to iunmap

Nikolay Aleksandrovich Pavlov
In reply to this post by Tim Johnson-3
Ответ на сообщение «Proper way to iunmap»,
присланное в 01:07:48 22 сентября 2010, Среда,
отправитель Tim Johnson:

There are three ways of doing this without directly modifying the source:
1. Contact the authors and make them add `<unique>' to `map' arguments.
2. Use the after directory. If I am not mistaking, you should `iunmap'
statements into ~/.vim/after/ftplugin/php/php.vim.
3. Use the Filetype autocommand which is invoked after sourcing filetype
scripts.

Текст сообщения:

> Using vim 7.2 Huge version with GTK2 GUI on Ubuntu 10.04
>
> I'd like to make use of ~/.vim/ftplugin/php/php.vim - that is, the
> php.vim that is included in the `piv' package. There is much to
> recommend it, however, the following characters: ({["' are remapped
> in php.vim and they interfere with my own imapping.
>
> I can go into that file and remove the inoremap statements, but that
> seems kind of crude (to me). Can anyway recommend a more
> 'professional' or 'vimish' way to do so?
>
> thanks

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proper way to iunmap

Tim Johnson-3
* ZyX <[hidden email]> [100921 13:46]:

> Ответ на сообщение <<Proper way to iunmap>>,
> присланное в 01:07:48 22 сентября 2010, Среда,
> отправитель Tim Johnson:
>
> There are three ways of doing this without directly modifying the source:
> 1. Contact the authors and make them add `<unique>' to `map' arguments.
> 2. Use the after directory. If I am not mistaking, you should `iunmap'
> statements into ~/.vim/after/ftplugin/php/php.vim.
> 3. Use the Filetype autocommand which is invoked after sourcing filetype
> scripts.
  Understood, thanks to you and to Gary. Solved.
  cheers

--
Tim
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php