Skip to content

Create map/option list like function list? #69

Description

@sisrfeng

I want to move the cursor to the line with my map which I want to modify.
image

my current setting:

    "  快速查map
            func! Leo_keymap(keys)
                exe "verbose map "  . a:keys
                exe "verbose map! " . a:keys
                exe "verbose tmap " . a:keys

                " 不好: (没有上面的那么智能)
                    " exe "verbose nmap " . a:keys
                    " exe "verbose omap " . a:keys
                    " exe "verbose vmap " . a:keys
                    " exe "verbose imap " . a:keys
                    " exe "verbose cmap " . a:keys
                    " exe "verbose tmap " . a:keys
                " 不行
                    " exe "Verbose map " . a:keys  . <Bar> . "verbose map! " . a:keys . <Bar> .  "verbose tmap " . a:keys
            endfunc
            " nn map       :Verbose call Leo_keymap( input("请输入{left_hand_side}:") )<cr>
                " 想偷懒 每次少敲<c-c>, 但不行
                " nn map       :Verbose call Leo_keymap( input("请输入{left_hand_side}:<c-v>") )<cr>
            nn cd /\s\d<cr>lyiwbbg
                " capture digit 跳到数字处 并复制行号
                " \s : 空白符
                " \d : 数字
            vn map  <esc>:Verbose call Leo_keymap('')<left><Left>

            cnoreabbrev <expr> map   getcmdtype() == ":" && getcmdline() == 'map'          ? 'Verbose call Leo_keymap("")<left><left>'                       :   'map'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions