Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create map/option list like function list? #69

Open
sisrfeng opened this issue Feb 25, 2022 · 0 comments
Open

Create map/option list like function list? #69

sisrfeng opened this issue Feb 25, 2022 · 0 comments

Comments

@sisrfeng
Copy link

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant