Skip to content

Can't use double-quote in a mapping #1212

Closed
@flwyd

Description

@flwyd

Self-Diagnosis

  • I have searched the issues for an answer to my question.
  • I have reviewed the NERDTree documentation. :h NERDTree
  • I have reviewed the Wiki.
  • I have searched the web for an answer to my question.

Environment (for bug reports)

  • Operating System: MacOS
  • Vim/Neovim version :echo v:version: 802
  • NERDTree version, found on 1st line in NERDTree quickhelp ?: 6.10.0
  • vimrc settings
    • NERDTree variables
    function! QuoteMapping() abort
      echo "Hello, world!"
    endfunction
    call NERDTreeAddKeyMap({'key': ',"', 'callback': 'QuoteMapping', 'quickhelpText': 'say hello'})
    • Other NERDTree-dependent Plugins
      • jistr/vim-nerdtree-tabs
      • ryanoasis/vim-devicons
      • tiagofumo/vim-nerdtree-syntax-highlight
      • Xuyuanp/nerdtree-git-plugin
      • Others (specify):
    • I've verified the issue occurs with only NERDTree installed.

Steps to Reproduce the Issue

  1. Declare a NERDTree key mapping that involves a double-quote (")
  2. Open NERDTree
  3. Use the mapping

Current Result (Include screenshots where appropriate.)

E116: Invalid arguments for function nerdtree#ui_glue#invokeKeyMap

Expected Result

Mappings can include any ASCII character.

This can probably be addressed like #948. I don't know if any other characters also need to be escaped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions