Loading ...
Sorry, an error occurred while loading the content.

can I configure the "default" commands?

Expand Messages
  • Jorge Timón
    Hi, Now I know how to map a command (for example :tabnext) to a key or combination of key (C-TAB). But can I change default commands like dd, w, $, 0...? I
    Message 1 of 13 , Mar 1, 2010
    • 0 Attachment
      Hi, Now I know how to map a command (for example :tabnext) to a key or
      combination of key (C-TAB). But can I change "default" commands like
      dd, w, $, 0...?
      I don't know if "default" is the right name for them.
      Is there a file where this mappings/bindings are done like
      map h :cursorleft
      map j :cursordown
      ...
      or something like that?
      Is there a list of all the default mappings?

      Maybe you're asking yourselves why would I want to change it.
      I use a spanish keyborad and some keys (like []{}) aren't very accessible.

      Thank you

      --
      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
    • Tony Mechelynck
      ... To change what w does (instead of move to word ) you may have to remap it in Normal, Visual and Operator-Pending modes, but not in Select mode where it
      Message 2 of 13 , Mar 1, 2010
      • 0 Attachment
        On 01/03/10 13:37, Jorge Timón wrote:
        > Hi, Now I know how to map a command (for example :tabnext) to a key or
        > combination of key (C-TAB). But can I change "default" commands like
        > dd, w, $, 0...?
        > I don't know if "default" is the right name for them.
        > Is there a file where this mappings/bindings are done like
        > map h :cursorleft
        > map j :cursordown
        > ...
        > or something like that?
        > Is there a list of all the default mappings?
        >
        > Maybe you're asking yourselves why would I want to change it.
        > I use a spanish keyborad and some keys (like []{}) aren't very accessible.
        >
        > Thank you
        >

        To change what w does (instead of "move to word") you may have to remap
        it in Normal, Visual and Operator-Pending modes, but not in Select mode
        where it should (still) replace the selection by the letter w. The {rhs}
        of the mapping may or may not be different for each mode, depending on
        what you want to achieve. Similarly for $. It is not possible to map 0
        in Normal mode (or it would make it impossible to type a zero as part of
        a count), try mapping <Home> instead.

        To change what dd does, remap d (the second d) in (only)
        Operator-Pending mode using an <expr> mapping, because you want to remap
        it to d (and allow remaps i.e. use :omap, not :onoremap) for all values
        of v:operator (q.v.) except "d". Or else, remap dd in Normal and Visual
        (but not Select or Operator-Pending).

        The definition of what a key does when starting up (before sourcing any
        vimrc or other script, and before any -c or -cmd command-line switch) is
        defined in the C code, you cannot change it without recompiling (and I
        don't recommend recompiling Vim after patching it for that purpose).

        The list of all the default key bindings is in the index.txt helpfile
        (see :help index.txt). To know what one particular key does in one
        particular mode, you should probably use the helptag for that key in
        that mode.

        For "not very accessible keys", OTOH, you want to make some other key
        function as if it were, let's say, Ctrl-], and that in all modes. The
        following example shows what I use for my Belgian keyboard (where Ctrl-]
        requires using Ctrl and AltGr together while pressing the key at the far
        right end of the AZERTY row):

        :noremap <F9> <C-]>
        :noremap! <F9> <C-]>

        IOW, I use F9 whenever I want to trigger the function of the Ctrl-] key.
        Whether to use :map or :noremap here is a question of whether we want to
        allow or disallow doing something else instead of (for Ctrl-]) jumping
        to a tag (in Normal/Visual) or triggering an abbreviation (in
        Insert/Replace/Command-line).

        See
        :help map-overview
        :help :map-modes
        :help v:operator
        :help :map-<expr>

        Best regards,
        Tony.
        --
        ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
        Midst echoing shouts of "run away" the KNIGHTS retreat to cover with
        the odd
        cow or goose hitting them still. The KNIGHTS crouch down under cover.
        "Monty Python and the Holy Grail" PYTHON (MONTY)
        PICTURES LTD

        --
        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
      • Jorge Timón
        Thank you very much. index.txt is what I needed, althought it seems to be bigger than I first thought. So I can just map on top of this default settings,
        Message 3 of 13 , Mar 2, 2010
        • 0 Attachment
          Thank you very much. index.txt is what I needed, althought it seems to
          be bigger than I first thought.
          So I can just map "on top" of this default settings, being careful of
          what mode I'm mapping to.
          I guess I'll just map keys in normal mode anyway.
          if I want to map, for example, u to k and k to l, what should be the
          order? Can I do that?
          In this case, I've hide the "Undo" function, since the u key will
          perform the "Up" function (I don't know if it's correct to call them
          functions, but I think you understand me).
          Is there a way to know if you've hide any key after mapping?
          Have the keys in index an equivalent Ex command?

          Thank you

          El día 1 de marzo de 2010 14:34, Tony Mechelynck
          <antoine.mechelynck@...> escribió:
          > On 01/03/10 13:37, Jorge Timón wrote:
          >>
          >> Hi, Now I know how to map a command (for example :tabnext) to a key or
          >> combination of key (C-TAB). But can I change "default" commands like
          >> dd, w, $, 0...?
          >> I don't know if "default" is the right name for them.
          >> Is there a file where this mappings/bindings are done like
          >> map h :cursorleft
          >> map j :cursordown
          >> ...
          >> or something like that?
          >> Is there a list of all the default mappings?
          >>
          >> Maybe you're asking yourselves why would I want to change it.
          >> I use a spanish keyborad and some keys (like []{}) aren't very accessible.
          >>
          >> Thank you
          >>
          >
          > To change what w does (instead of "move to word") you may have to remap it
          > in Normal, Visual and Operator-Pending modes, but not in Select mode where
          > it should (still) replace the selection by the letter w. The {rhs} of the
          > mapping may or may not be different for each mode, depending on what you
          > want to achieve. Similarly for $. It is not possible to map 0 in Normal mode
          > (or it would make it impossible to type a zero as part of a count), try
          > mapping <Home> instead.
          >
          > To change what dd does, remap d (the second d) in (only) Operator-Pending
          > mode using an <expr> mapping, because you want to remap it to d (and allow
          > remaps i.e. use :omap, not :onoremap) for all values of v:operator (q.v.)
          > except "d". Or else, remap dd in Normal and Visual (but not Select or
          > Operator-Pending).
          >
          > The definition of what a key does when starting up (before sourcing any
          > vimrc or other script, and before any -c or -cmd command-line switch) is
          > defined in the C code, you cannot change it without recompiling (and I don't
          > recommend recompiling Vim after patching it for that purpose).
          >
          > The list of all the default key bindings is in the index.txt helpfile (see
          > :help index.txt). To know what one particular key does in one particular
          > mode, you should probably use the helptag for that key in that mode.
          >
          > For "not very accessible keys", OTOH, you want to make some other key
          > function as if it were, let's say, Ctrl-], and that in all modes. The
          > following example shows what I use for my Belgian keyboard (where Ctrl-]
          > requires using Ctrl and AltGr together while pressing the key at the far
          > right end of the AZERTY row):
          >
          >        :noremap  <F9> <C-]>
          >        :noremap! <F9> <C-]>
          >
          > IOW, I use F9 whenever I want to trigger the function of the Ctrl-] key.
          > Whether to use :map or :noremap here is a question of whether we want to
          > allow or disallow doing something else instead of (for Ctrl-]) jumping to a
          > tag (in Normal/Visual) or triggering an abbreviation (in
          > Insert/Replace/Command-line).
          >
          > See
          >        :help map-overview
          >        :help :map-modes
          >        :help v:operator
          >        :help :map-<expr>
          >
          > Best regards,
          > Tony.
          > --
          > ARTHUR: (as the MAN next to him is squashed by a sheep) Knights!  Run away!
          >   Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the
          > odd
          >   cow or goose hitting them still.  The KNIGHTS crouch down under cover.
          >                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES
          > LTD
          >

          --
          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
        • John Beckett
          ... At this page: http://vim.wikia.com/wiki/Vim_documentation is a Keyboard cheat sheet and tutorial link to:
          Message 4 of 13 , Mar 2, 2010
          • 0 Attachment
            Jorge Timón wrote:
            > Thank you very much. index.txt is what I needed, althought it
            > seems to be bigger than I first thought.
            > So I can just map "on top" of this default settings, being
            > careful of what mode I'm mapping to.
            > I guess I'll just map keys in normal mode anyway.
            > if I want to map, for example, u to k and k to l, what should
            > be the order? Can I do that?
            > In this case, I've hide the "Undo" function, since the u key
            > will perform the "Up" function (I don't know if it's correct
            > to call them functions, but I think you understand me).
            > Is there a way to know if you've hide any key after mapping?
            > Have the keys in index an equivalent Ex command?

            At this page:
            http://vim.wikia.com/wiki/Vim_documentation

            is a "Keyboard cheat sheet and tutorial" link to:
            http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html

            which is an excellent summary of the meaning of the normal-mode
            keys. There is also ':help normal-index' which is on index.txt
            mentioned above.

            I understand you have some issues with your keyboard, but I will
            give some frank advice: It is a total mistake to hope to improve
            on the default meanings of the normal-mode keys. You will not
            come up with an improvement, and will only hinder learning how
            to properly use Vim.

            John

            --
            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
          • Tony Mechelynck
            ... If you want to make the u key act as if it were k, and k act as if it were l, then use ... The order in which you define the mappings is irrelevant, but in
            Message 5 of 13 , Mar 2, 2010
            • 0 Attachment
              On 02/03/10 09:13, Jorge Timón wrote:
              > Thank you very much. index.txt is what I needed, althought it seems to
              > be bigger than I first thought.
              > So I can just map "on top" of this default settings, being careful of
              > what mode I'm mapping to.
              > I guess I'll just map keys in normal mode anyway.
              > if I want to map, for example, u to k and k to l, what should be the
              > order? Can I do that?
              > In this case, I've hide the "Undo" function, since the u key will
              > perform the "Up" function (I don't know if it's correct to call them
              > functions, but I think you understand me).
              > Is there a way to know if you've hide any key after mapping?
              > Have the keys in index an equivalent Ex command?
              >
              > Thank you

              If you want to make the u key act as if it were k, and k act as if it
              were l, then use

              :noremap u k
              :noremap k l

              The order in which you define the mappings is irrelevant, but in this
              case it is important to use :noremap (at least for u to k) so that the
              result is not mapped again.

              To know if the {lhs} of a mapping hides a default key binding, check the
              help, in this case

              :help u
              :help k

              To use Normal-mode keys in an ex-command (e.g. in a script), see

              :help :normal

              Some of the key bindings also have equivalent ex-commands (e.g. :wincmd
              for Ctrl-W ) but that depends on the particular Normal-mode key binding.


              Best regards,
              Tony.
              --
              The scum also rises.
              -- Dr. Hunter S. Thompson

              --
              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
            • Tony Mechelynck
              On 02/03/10 11:24, John Beckett wrote: [...] ... In general this is true, but there are exceptions: for example, to produce Ctrl-] on my Belgian keyboard, I
              Message 6 of 13 , Mar 2, 2010
              • 0 Attachment
                On 02/03/10 11:24, John Beckett wrote:
                [...]
                > I understand you have some issues with your keyboard, but I will
                > give some frank advice: It is a total mistake to hope to improve
                > on the default meanings of the normal-mode keys. You will not
                > come up with an improvement, and will only hinder learning how
                > to properly use Vim.
                >
                > John
                >

                In general this is true, but there are exceptions: for example, to
                produce Ctrl-] on my Belgian keyboard, I need (as I said) to use
                AltGr-Ctrl-$, which is not the easiest combination, and in addition, I
                only recently discovered that the keyboard was able at all to produce
                it. But I agree that Jorge's examples (u to k and k to l) are not
                recommended; even if you use a Dvorak keyboard it is not recommended to
                map the letters around in the mistaken intention of getting the hjkl
                commands under the four fingers of your unmoving right hand.


                Best regards,
                Tony.
                --
                Please, won't somebody tell me what diddie-wa-diddie means?

                --
                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
              • Jorge Timón
                Thank you. I appreciate your advice. I m just starting to learn how to use vim. Since I spend most part of my day editing test (and most of that time
                Message 7 of 13 , Mar 2, 2010
                • 0 Attachment
                  Thank you.
                  I appreciate your advice. I'm just starting to learn how to use vim.
                  Since I spend most part of my day editing test (and most of that time
                  programming), I realised that I really need a text editor/IDE that I
                  could use for anything. Right now, I use Eclipse at work (Java) and
                  vim when I need another editor (instead of using wordpad or things
                  like that). I'm also developing a project in C/C++ (although a little
                  part of it is written in x86 assembly and NVIDIA's CUDA). I tried
                  Eclipse for C/C++ but it doesn't work like it does for Java.
                  Looking for a substitute I read a lot about vim and emacs. Almost
                  everybody in the forums stated that the one they use is by far the
                  best, so I had to decide it by myself. Both are very extensible and
                  extended so it was hard to find a feature in one that you cannot get
                  in the other one.
                  I think the approach of vim of having a normal mode in which you can
                  run complex commands by just typing a key (instead of having to type
                  Auxiliary keys all the time) is a great idea.
                  That's why I finally choose Vim.
                  I'm aware that the keys weren't chosen at random, but maybe the
                  distribution is not the better. The most used keys should be the ones
                  that are closer to the fingers when they are in the home row. I still
                  don't know what keys I'm going to use more and I shouldn't change
                  basic configurations before I know it, because then I'd probably get
                  bad habits.
                  But when I know better how to use Vim I will have better chances of
                  knowing that I don't use some keys never and I got them very close
                  while I use others a lot and they are "far away" from my fingers.
                  Some examples:
                  I don't think I'm going to use i, c, R, a and A: I'll probably just
                  use i and A (maybe I'm wrong).
                  I'm sure that I want } closer to me than ç and I have them in the same
                  key, but by pressing <Alt Gr> too, I get a { (if I don't press <Alt
                  Gr>, I get a ç, which is useless in Vim).
                  I just wanted to know how to make some changes, but it's true that I
                  shouldn't make too much of them until I get used to the defaults.
                  I'm curious too about how to change the functions between two keys.
                  For example, change the j for the k, although it hasn't much sense.
                  Maybe it's not possible.

                  Thank you


                  2010/3/2 John Beckett <johnb.beckett@...>:
                  > Jorge Timón wrote:
                  >> Thank you very much. index.txt is what I needed, althought it
                  >> seems to be bigger than I first thought.
                  >> So I can just map "on top" of this default settings, being
                  >> careful of what mode I'm mapping to.
                  >> I guess I'll just map keys in normal mode anyway.
                  >> if I want to map, for example, u to k and k to l, what should
                  >> be the order? Can I do that?
                  >> In this case, I've hide the "Undo" function, since the u key
                  >> will perform the "Up" function (I don't know if it's correct
                  >> to call them functions, but I think you understand me).
                  >> Is there a way to know if you've hide any key after mapping?
                  >> Have the keys in index an equivalent Ex command?
                  >
                  > At this page:
                  > http://vim.wikia.com/wiki/Vim_documentation
                  >
                  > is a "Keyboard cheat sheet and tutorial" link to:
                  > http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html
                  >
                  > which is an excellent summary of the meaning of the normal-mode
                  > keys. There is also ':help normal-index' which is on index.txt
                  > mentioned above.
                  >
                  > I understand you have some issues with your keyboard, but I will
                  > give some frank advice: It is a total mistake to hope to improve
                  > on the default meanings of the normal-mode keys. You will not
                  > come up with an improvement, and will only hinder learning how
                  > to properly use Vim.
                  >
                  > John
                  >
                  > --
                  > 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
                  >

                  --
                  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
                • Gary Johnson
                  ... Once you get beyond just inserting text at a particular point (i, a and A), and starting learning about Vim s text objects (see :help 04.8 ), you ll find
                  Message 8 of 13 , Mar 2, 2010
                  • 0 Attachment
                    On 2010-03-02, Jorge Timón wrote:

                    > I don't think I'm going to use i, c, R, a and A: I'll probably just
                    > use i and A (maybe I'm wrong).

                    Once you get beyond just inserting text at a particular point (i, a
                    and A), and starting learning about Vim's text objects (see ":help
                    04.8"), you'll find c extremely useful.

                    I don't use a or R very often, but in some situations they are
                    exactly the right tool and it's good to know them and have them
                    available.

                    Regards,
                    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
                  • Tony Mechelynck
                    ... The advantage of a is that (if nothing else moves the cursor, and except when inserting at start-of-line) alternating with a keeps the cursor in the
                    Message 9 of 13 , Mar 7, 2010
                    • 0 Attachment
                      On 02/03/10 20:29, Gary Johnson wrote:
                      > On 2010-03-02, Jorge Timón wrote:
                      >
                      >> I don't think I'm going to use i, c, R, a and A: I'll probably just
                      >> use i and A (maybe I'm wrong).
                      >
                      > Once you get beyond just inserting text at a particular point (i, a
                      > and A), and starting learning about Vim's text objects (see ":help
                      > 04.8"), you'll find c extremely useful.
                      >
                      > I don't use a or R very often, but in some situations they are
                      > exactly the right tool and it's good to know them and have them
                      > available.
                      >
                      > Regards,
                      > Gary
                      >

                      The advantage of a is that (if nothing else moves the cursor, and except
                      when inserting at start-of-line) alternating <Esc> with a keeps the
                      cursor in the same place: Esc moves the cursor one step left as it goes
                      to Normal mode while a moves it one step right as it goes to Insert mode.

                      c is indeed very useful with text objects: ciw "change inner word", ciW
                      "change inner WORD" ("inner" because we keep the surrounding blanks), or
                      even cc (change current line).

                      R goes straight to Replace mode; with the "side" keys you would need to
                      hit <Insert> twice to do the same (once to go from Normal to Insert and
                      then again to toggle between Insert and Replace).

                      As for Jorge's wish to swap j and k it is possible but IMHO confusing.
                      If you don't remember which is which, one mnemotechnical trick is that j
                      has a tail below it while k has a tail above.


                      Best regards,
                      Tony.
                      --
                      Doctors take two aspirin and do it in the morning.

                      --
                      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
                    • Jorge Timón
                      Thanks for all your advices. I don t want to swap j and k. It was just an example. I want to know how to swap normal keys like j and k. I don t know what for
                      Message 10 of 13 , Mar 9, 2010
                      • 0 Attachment
                        Thanks for all your advices.

                        I don't want to swap j and k. It was just an example. I want to know
                        how to swap "normal" keys like j and k. I don't know what for yet. I
                        just want to know how to do it.
                        Probably I won't find an example that you find reasonable. Maybe I
                        find to "expensive" to type $ (S-4) or in my keyboard ][ (AltGr-` and
                        AltGr-+). I know is going to be hard to find a key that I don't want
                        to use enough to swap it with any "expensive" key combination that
                        produces a command that I feel I want to be easier to type.

                        Will it work?
                        :noremap j k
                        :noremap k j

                        More interesting, will it work?

                        :noremap ' {
                        :noremap ç }

                        note that I have ' ` and ' (three different keys).

                        thanks

                        On 7 mar, 20:03, Tony Mechelynck <antoine.mechely...@...> wrote:
                        > On 02/03/10 20:29, Gary Johnson wrote:
                        >
                        >
                        >
                        >
                        >
                        > > On 2010-03-02, Jorge Tim n wrote:
                        >
                        > >> I don't think I'm going to use i, c, R, a and A: I'll probably just
                        > >> use i and A (maybe I'm wrong).
                        >
                        > > Once you get beyond just inserting text at a particular point (i, a
                        > > and A), and starting learning about Vim's text objects (see ":help
                        > > 04.8"), you'll find c extremely useful.
                        >
                        > > I don't use a or R very often, but in some situations they are
                        > > exactly the right tool and it's good to know them and have them
                        > > available.
                        >
                        > > Regards,
                        > > Gary
                        >
                        > The advantage of a is that (if nothing else moves the cursor, and except
                        > when inserting at start-of-line) alternating <Esc> with a keeps the
                        > cursor in the same place: Esc moves the cursor one step left as it goes
                        > to Normal mode while a moves it one step right as it goes to Insert mode.
                        >
                        > c is indeed very useful with text objects: ciw "change inner word", ciW
                        > "change inner WORD" ("inner" because we keep the surrounding blanks), or
                        > even cc (change current line).
                        >
                        > R goes straight to Replace mode; with the "side" keys you would need to
                        > hit <Insert> twice to do the same (once to go from Normal to Insert and
                        > then again to toggle between Insert and Replace).
                        >
                        > As for Jorge's wish to swap j and k it is possible but IMHO confusing.
                        > If you don't remember which is which, one mnemotechnical trick is that j
                        > has a tail below it while k has a tail above.
                        >
                        > Best regards,
                        > Tony.
                        > --
                        > Doctors take two aspirin and do it in the morning.

                        --
                        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
                      • Tim Chase
                        ... As long as you use nnoremap instead of nmap , yes. ... In theory, yes... ... I m not sure what the diff between #1 and #3 are (they both look like the
                        Message 11 of 13 , Mar 9, 2010
                        • 0 Attachment
                          > Will it work?
                          > :noremap j k
                          > :noremap k j

                          As long as you use "nnoremap" instead of "nmap", yes.

                          > More interesting, will it work?
                          >
                          > :noremap ' {
                          > :noremap ç }

                          In theory, yes...

                          > note that I have ' ` and ' (three different keys).


                          I'm not sure what the diff between #1 and #3 are (they both look
                          like the same character to me). Vim uses both the regular
                          apostrophe ' and the back-tick ` to jump to marks, so unless one
                          of these is a 3rd uni-stroke jot, I wouldn't remap either.

                          -tim


                          --
                          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
                        • Jorge Timón
                          I m sorry, I think I ve typed it wrong. ` ´ # 1 Tim s house # 2 vou à praza (portuguese) # 3 configuración (spanish) ... For now I ll just replace keys
                          Message 12 of 13 , Mar 11, 2010
                          • 0 Attachment
                            I'm sorry, I think I've typed it wrong.
                            ' ` ´
                            # 1 Tim's house
                            # 2 vou à praza (portuguese)
                            # 3 configuración (spanish)

                            Then I think it should be:

                            :nnoremap ´ {
                            :nnoremap ç }

                            For now I'll just replace keys that are useless in vim.
                            Thank you all

                            On 9 mar, 15:42, Tim Chase <v...@...> wrote:
                            > > Will it work?
                            > > :noremap j k
                            > > :noremap k j
                            >
                            > As long as you use "nnoremap" instead of "nmap", yes.
                            >
                            > > More interesting, will it work?
                            >
                            > > :noremap ' {
                            > > :noremap }
                            >
                            > In theory, yes...
                            >
                            > > note that I have ' ` and ' (three different keys).
                            >
                            > I'm not sure what the diff between #1 and #3 are (they both look
                            > like the same character to me).  Vim uses both the regular
                            > apostrophe '  and the back-tick ` to jump to marks, so unless one
                            > of these is a 3rd uni-stroke jot, I wouldn't remap either.
                            >
                            > -tim

                            --
                            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
                          • Tony Mechelynck
                            ... The above is a good solution for Normal mode; but if you do some programming in C, C++, CSS, or any other language that uses braces, you ll need to type
                            Message 13 of 13 , Apr 7, 2010
                            • 0 Attachment
                              On 11/03/10 09:20, Jorge Timón wrote:
                              > I'm sorry, I think I've typed it wrong.
                              > ' ` ´
                              > # 1 Tim's house
                              > # 2 vou à praza (portuguese)
                              > # 3 configuración (spanish)
                              >
                              > Then I think it should be:
                              >
                              > :nnoremap ´ {
                              > :nnoremap ç }
                              >
                              > For now I'll just replace keys that are useless in vim.
                              > Thank you all

                              The above is a good solution for Normal mode; but if you do some
                              programming in C, C++, CSS, or any other language that uses braces,
                              you'll need to type the { } characters into the text (in Insert mode),
                              and there, of course, you cannot afford to lose non-ASCII characters
                              that may have to be typed, in, for instance, comments to the same code,
                              or even plaintext in a different file.

                              See :help :map-<buffer> about defining maps for one file only (you would
                              use that in a filetype-plugin or in an autocommand, or at the keyboard);
                              or else, for mappings that may have to exist in all modes I recommend
                              using the Fn and Shift-Fn keys (with the exception of F1 = Help and
                              possibly F10 = Menu) as the {lhs}. Ctrl-Fn keystrokes aren't as portable
                              across platforms, they may perhaps be used on Windows but they aren't a
                              good choice for Linux or even for double-boot, because there they won't
                              always reach Vim. As for Alt-Fn, IIRC even Windows snatches it for
                              "window management" and other actions without passing them to the
                              application.

                              If you need really many mappings you can start using multikey {lhs}es,
                              where the initial key would be a kind of "prefix" and the rest can even
                              be keys that Vim uses -- when the prefix key isn't before them. You
                              could for instance use

                              :map! ç( {
                              :map! ç) }

                              for Insert and Command-line modes (and without the exclamation mark for
                              Normal, Visual and Operator-Pending), and ç will still be a c-cedilla
                              when followed by, for instance, a vowel (but you won't see it appear in
                              your text until you type the next letter, or until 'timeoutlen' (q.v.)
                              milliseconds if you don't type anything after the ç key). You can even
                              map! çç to ç if you're impatient. ;-)


                              Best regards,
                              Tony.
                              --
                              "Honesty is the best policy, but insanity is a better defense"

                              --
                              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

                              To unsubscribe, reply using "remove me" as the subject.
                            Your message has been successfully submitted and would be delivered to recipients shortly.