Git Product home page Git Product logo

Comments (3)

edkolev avatar edkolev commented on May 21, 2024

As you pointed out in #14, Vim's gn replaces https://github.com/kana/vim-textobj-lastpat, provided Vim is 7.4.110+, so providing a setting to disable / is no longer necessary.

Still, it may be a good idea to allow certain mapping created by targets.vim to be disabled. Something like this comes to mind:

let g:targets_disable_mappings = {
   "separators" : [ '/', ',' ],
   "pairs": [ "(" ]}

This would disable /, ,, (, b mappings. Not sure how l & n should be disabled..

However, I'm not sure if it's worth implementing all of these settings, as I don't think there would be that many conflicts with other plugins.

from targets.vim.

wellle avatar wellle commented on May 21, 2024

We were just discussing customizability over in #32. Just wanted to give you a heads up in case you want to weigh in. This is what I proposed:

What do you think about these default values that could be overwritten in the .vimrc?

g:targets_aiAI = 'aiAI'
g:targets_nlNL = 'nlNL'
g:targets_pairs = '()b {}B []r <>a'   " list of pairs with optional alias
g:targets_quotes = '"''`'             " note the escaped single quote inside
g:targets_separators = ',.;:+-~_*/\|'

So in you would set the first variable to use h instead of i:

let g:targets_aiAI = 'ahAH'

And someone who doesn't need N and L, but prefers to use N for last text objects could use this:

let g:targets_nlNL = 'nN  '           " space means disabled

To expand on your examples:

let g:targets_separators = '.;:+-~_*\|'    " disable / ,
let g:targets_pairs = '{}B []r <>a'        " disable ( ) b
let g:targets_nlNL = '  NL'                " disable n l

from targets.vim.

edkolev avatar edkolev commented on May 21, 2024

Thanks for letting me know. Looks a bit cryptic at first, but gets the jobs done.

from targets.vim.

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.