Comments (6)
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.
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.
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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim9-syntax.