Code Monkey home page Code Monkey logo

Comments (2)

inkarkat avatar inkarkat commented on July 17, 2024 3

This error is caused by the <unique>. I don't usually put that in my plugins; any existing mapping would then be silently overwritten. But the original Mark plugin had it like that, and there are both pros and cons for each approach. If you have a strong opinion here, I'd like to hear it!


How to solve this depends on what exactly you finally want:

Keep the existing mapping, want to use different keys for this Mark mapping:

Just define your own mapping, e.g.

nmap ,,n <Plug>MarkClear

This must be done before Mark is loaded; usually in your ~/.vimrc.

Keep the existing mapping, I don't want this Mark mapping at all:

Define a dummy mapping to a <Plug>Disable... key combo that will never trigger:

nmap <Plug>DisableMarkClear <Plug>MarkClear

If the other plugin does not use <unique> in its definition, you could also switch the order of sourcing the plugins (so that Mark comes first), but that's overly complex and not very clear.

Override the existing mapping with Mark's default:

If the other mapping also uses this canonical <Plug>-mapping approach, you can use one of the above. Some plugins may use g:... variables to disable mappings. Worst case, you have to edit that plugin and comment out / change the mapping directly in the script.

That's a general plugin configuration problem, by the way; nothing special about Mark here.

from vim-mark.

voldikss avatar voldikss commented on July 17, 2024

Keep the existing mapping, want to use different keys for this Mark mapping:

Just define your own mapping, e.g.

nmap ,,n <Plug>MarkClear

@inkarkat
Just remind that
map is better than nmap here, because some original mapping are xmap, see this line:

if !hasmapto('<Plug>MarkSet', 'x')

from vim-mark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.