Friday, November 27, 2009

Re: & xmledit

Tuo Pe schrieb:
> Hello!
>
> xmledit <http://www.vim.org/scripts/script.php?script_id=301> defines
> many useful text-editing commands, one of them being "Delete Tag"
> (\d). However, I would prefer some other "leader character", as '\' is
> cumbersome for me to type. I would like to have ',' (comma) as the
> leader character for XML-files. How do I change the setting?
>
> I've read the page
> <http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_%28Part_3%29>.
> It states that,
> "Vim replaces <Leader> with the 'mapleader' value only when defining
> the map and not when the map is invoked. This means that after several
> map commands are defined if the 'mapleader' variable is changed, it
> will not affect the previously defined maps."
>
> So I figure that I need to change the setting in
> ~/.vim/ftplugin/xml.vim file, before
> `nnoremap <silent> <buffer> <LocalLeader>'
> commands. I tried to insert this line
> let maplocalleader = ","
>
> right after the line
> let b:did_ftplugin = 1 (line 28 in my file).
> But that didn't work. So what would be the correct place to make the
> change?
>
> Thanks for anyone taking time with this.
>
> Best vimshes,
> Tuomas

:let maplocalleader = ','

is a setting for the vimrc: controlled by the user, constant throughout
the session.

--
Andy

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

No comments:

Post a Comment