Giter Club home page Giter Club logo

Comments (6)

lacygoill avatar lacygoill commented on August 16, 2024 1

An improvement would be to add to the regex in the syntax match vim9MarkCmdArg, but I don't know if you want to further complicate the regex:

There are other locations where the plugin needs to allow for a keycode like <Bar>, <CR>. I think for those, < is allowed. So, to be consistent, I did the same thing; I just allowed < in this commit. Maybe, it's not accurate enough. But for now, that should be enough.

from vim9-syntax.

lacygoill avatar lacygoill commented on August 16, 2024 1

It looks like the backtick doesn't even change anything. I thought it would also save the column position but that's not the case.

Yes, most Ex commands operate linewise. They are not aware of the column cursor position, which is why I prefer the single quote as an argument in a :mark command (it's less misleading). For a column-aware command, :normal can be used instead (because it simulates a keypress):

                       v------------------v
nnoremap ]x <scriptcmd>execute 'normal! m`'<bar>range(v:count1)->map((_, _) => search('^\(<\\|=\\|>\)\{7}\([^=].\+\)\?$', 'W'))<cr>

from vim9-syntax.

bfrg avatar bfrg commented on August 16, 2024

Thank you. It fixes the issue with the white space. But what about the backtick? It's still not contained in mark_vaild.

from vim9-syntax.

bfrg avatar bfrg commented on August 16, 2024

It looks like the backtick doesn't even change anything. I thought it would also save the column position but that's not the case. Anyway, it's fixed as far as I'm concerned.

from vim9-syntax.

bfrg avatar bfrg commented on August 16, 2024

The problem with execute 'normal! m`' is that the count doesn't work anymore. I should probably just use a separate function after all.

Thanks anyway!

from vim9-syntax.

lacygoill avatar lacygoill commented on August 16, 2024

The problem with execute 'normal! m`' is that the count doesn't work anymore.

Not sure, but maybe :help v:prevcount could help retrieve the old count.

I should probably just use a separate function after all.

Yes, as soon as the RHS becomes a little complicated, I turn it into a function; it's easier to read and maintain later.

from vim9-syntax.

Related Issues (6)

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.