Comments (4)
A few more (single-line) test cases that currently fail:
// More `%` test cases
CURSOR_TEST(motion_percent_multiple, "vec2(cos(x), sin(y))", "9l%", 8, 0); // fail: jumps to 18
CURSOR_TEST(motion_percent_multiple, "vec2(cos(x), sin(y))", "10l%", 8, 0); // should be same as previous (starting on paren) - fail: jumps to 18
CURSOR_TEST(motion_percent_multiple, "vec2(cos(x), sin(y))", "9l%%", 10, 0); // fail: jumps to 16
CURSOR_TEST(motion_percent_multiple, "vec2(cos(x), sin(y))", "17l%", 16, 0); // fail: jumps back to 8
CURSOR_TEST(motion_percent_multiple, "vec2(cos(x), sin(y))", "17l%%", 18, 0); // fail: jumps to 10
from zep.
Thanks for the report; I made this more complicated than it needed to be :) I've added the new unit tests and everything passes. Regarding your comment "Zep does not find matching parens when they're on a previous line (unlike Vim)." I think you may have been referring to the character on a final bracket matching a previous one on a different line:
{
} -< Matches to above
This seems to work too; but note that Zep will not search forward beyond the current line to find the bracket to start on. This matches neovim and VsVim as far as I can see.
from zep.
Yes, that's what I meant, and what you've done seems correct (especially if all those tests now pass...I've not tried it yet but it sounds good). Yes, it's not supposed to search forward beyond the current line to find a bracket to start on, according to the Vim "spec":
Find the next item in this line after or under the cursor and jump to its match. (from :help %)
The matched item may be on a different line (earlier or later), but the starting item should only be after the cursor, and only considering the current line.
Thanks again for this!
from zep.
Tested it out with the latest version and all seems great with %
, thanks.
from zep.
Related Issues (20)
- A few questions about Zep HOT 3
- Errors when building on Windows with GCC (MSYS2). HOT 4
- macOS build instructions HOT 8
- Slow performance? HOT 11
- Prebuild fails because vcpkg version depends on expired packages HOT 3
- cmake errors + fix? HOT 3
- Simple ImGUI example HOT 4
- Insert mode MotionRight can't reach end of line? HOT 1
- utf8::unchecked::iterator should not derive from std::iterator HOT 4
- Using Zep with "international" keyboard (key code remapping?) HOT 10
- C++17/20 compatibility? HOT 2
- Multiple changes / feedback HOT 4
- How to customize the theme colours and background HOT 1
- How is Zep's current input handling done? HOT 8
- % feature needs to skip inner brackets. HOT 1
- Select a line, SHIFT+V, then x should copy to registers, and be pasteable with 'p'
- ZepPath::replace_extension truncates character before dot. HOT 3
- LineWidget Input Processing HOT 5
- 'A' to 'E' letter keypresses emit F8-F12 when no SDL is used HOT 1
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 zep.