Comments (2)
To add to this, dw/cw also doesn't work on the last word in the file.
Seems like dw/cw in this plugin is looking ahead for a space followed by another character. If we are at the last word of line, it ends up finding this on the next line (not expected). If we are at the last word of the file, it can't find this at all so doesn't do anything (not expected).
I like the idea of this plugin but can't really use it until this is fixed.
from nvim-spider.
The default vim behavior when entering cw on a word in sentence is to preserve the post space which allows you to type a word and not have to add a space. This is in contrast to the dw command that deletes the post word space to make that word seem like it was never there.
Yeah, vim's original web
motions work quite inconsistent in this regard. I deliberately not implemented the same for this plugin, since with subword motions and punctuation skipping, you get a lot of other unexpected before if you introduce vim's behavior here. Same thing for dw
and cw
not working at the end of a file: When you are at the last word of a file, there literally is not next word, so not doing anything is actually the intended behavior.
In my view, original vim actually taught many people a bad habit here of treating cw
differently, when people should actually be using ce
instead. If you really want to, you can map cw
to ce
though, which should get you your desired behavior.
I added some info on this to the docs though.
ciw does work as expected
that's cause this plugin does not change the iw
text object at all ;)
from nvim-spider.
Related Issues (20)
- Feature Request: iw and aw HOT 1
- [Bug]: Movement stops at non-English accented letters HOT 5
- Feature Request: Allow option for empty lines to be a significant punctuation (especially for change)
- Feature Request: Allow option for empty lines to be a significant punctuation (especially for change) HOT 1
- [Bug]: Dot repeat is locking up the editor HOT 6
- [deleted] HOT 2
- Feature Request: skipInsignificantPunctuation only in normal mode? HOT 4
- Feature Request: Add W, (g)E and B HOT 2
- Feature Request: c-w (ctrl-w) should work HOT 2
- Feature Request: Word motion on camel case with capitalized acronyms HOT 3
- Feature Request: Add option to use default keymaps HOT 2
- Feature Request: add option to disable subwords HOT 5
- Feature Request: support `wildfire.nvim` HOT 2
- Feature Request: Add instructions for adding keymaps to lazy config HOT 2
- [Bug]: Bugs when camelCase names have numbers in them HOT 1
- [Bug]: Cannot bind to e.g. "<leader>w" HOT 2
- [Bug]: numbers in hex values are not ignored HOT 2
- Feature Request: Support subword delete in insert mode like CTRL-W HOT 1
- Feature Request: Pull in .editorconfig from your template repository HOT 1
- Feature Request/Bug? - Strange behavior on the last word of lines HOT 3
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 nvim-spider.