Comments (7)
@ferdinandyb I think there's a misunderstanding.
w
refers to the beginning of the next word (using word delimiters, such as.
,,
,:
, space, etc..W
refers to the beginning of the next word (using whitespace delimiters only)e
refers to the end of the current word (delimiters as inw
)W
refers to the end of the current word (delimiters as inW
, i.e. whitespaces only)
So pressing yW
will yank everything from the current cursor position to the beginning of the next word whereas yE
(and similarily ye
) will yank from current position to the end of the current word.
p.s.: I was implementing this based on what I was reading in the vim documentation. However, trying it out right now in vim (and Contour), I noticed a different in vim itself.
vim itself behaves differently in marking the range for yW
vs vW
. This is a WTF for me. I may have accidentally skipped reading something in the docs that would describe this, but to me that sounds a bit weird. Not sure sure why yW
and vW
in vim (neovim for me) do operate on a different range, that is, yW
excludes the right boundary whereas vW
does indeed include it (as we do in Contour, however, for both cases).
So not sure how to process on this ticket. If vim and neovim are doing it that way, then we should adapt of course. Because it's meant to be inspired by vim. It should feel the same then.
from contour.
from contour.
Keep me posted, please. :)
from contour.
from contour.
vim itself behaves differently in marking the range for
yW
vsvW
.
evil-mode behaves similar to contour, makes selection until the next word
from contour.
The vim question is still ongoing, but two comments came to mind:
-
yanking the first character of the next WORD is a bug either way: neither
yW
norvW
does that -
the exact amount of whitespace yanked could be totally irrelevant in many cases, especially if there's a white space stripping mechanism (which I sort of remember contour having?)
from contour.
Here's the detailed answer: https://vi.stackexchange.com/a/44056/25312. In short:
-
motions can be inclusive or exclusive, but that only counts after an operator, not when using them to move the cursor in normal mode
-
visual mode always implies inclusive unless the defaults are changed
I guess the question is, how close you want to copy vim. I personally think, it should be as close to vim defaults as possible, but that does entail some additional complexity right now.
from contour.
Related Issues (20)
- Improve documentation on hyperlink decorations HOT 14
- possible values of hyperlink decoration are undocumented HOT 2
- In normal mode copy and open the "$" motion doesn't work. HOT 3
- Add key bindings documentation to the web page HOT 5
- Compilation failure with LLVM 17: explicitly defaulted three-way comparison operator is implicitly deleted HOT 5
- Crash: Cursor (63, 0) does not match clamp to screen (63, 56). HOT 5
- When `show_title_bar:false` on Windows, Win+arrowkeys do not work for changing position/size HOT 2
- Improve user feedback for SSH profiles. HOT 1
- How to remove "Shell terminated too quickly. The window will not be closed automatically." HOT 4
- Alt screen does not move cursor same amount as primary screen for some emoji HOT 2
- Monitor scaling behaves weird on Windows. HOT 4
- No window shown HOT 3
- Some input gets forwarded to program while in normal mode
- crash using ssh on Windows HOT 9
- Ubuntu 22.04 Debian package missing dependency on libssh2 HOT 2
- normal mode search doesn't turn off keybinds
- Implement xterm's VT extension XTPUSHSGR / XTPOPSGR
- TERM variable no longer set HOT 5
- Dependency missing for Fedora package HOT 5
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 contour.