Comments (6)
This plugin doesn't touch W
, B
, E
, or gE
by default, so you don't have to worry about those.
let g:wordmotion_mappings = {
'w' : '<M-w>',
'b' : '<M-b>',
'e' : '<M-e>',
'ge' : 'g<M-e>',
'aw' : 'a<M-w>',
'iw' : 'i<M-w>'
}
should do what you want.
from vim-wordmotion.
Instead of using consider using <Plug>
s. It's more portable and also allows for some fancy things like allowing lazy loading by plugin managers.
Thanks for a great plugin :)
from vim-wordmotion.
Instead of using consider using
<Plug>
s.
Instead of using what?
from vim-wordmotion.
Whoops, I meant "instead of using a dictionary to specify maps". The advantage is if someone uses a plugin manager which allows lazy loading, they can do something like this.
This will cause the plugin to be loaded only when the maps are actually used.
from vim-wordmotion.
It's more portable
It's all vimscript, how is any one construct more portable than another? Unless you mean if some old vim version doesn't support dictionaries, but does support <Plug>
. I don't think that's the case, and honestly don't care even if it is.
The advantage is if someone uses a plugin manager which allows lazy loading
You can do this:
let g:wordmotion_mappings = {
'w' : '<Plug>WordmotionW',
'b' : '<Plug>WordmotionB',
...
}
map <M-w> <Plug>WordmotionW
map <M-b> <Plug>WordmotionB
...
I know what the other plugin does. I personally think that's extremely ugly, and option variables with the form g:<plugin name>_<option name>
are much cleaner and easier to keep track of. This workaround I just gave you is also extremely ugly, but you're free to do whatever you want.
Another thing is that lazy loading for tiny plugins like these is really unnecessary, but if you're that serious about saving 10 nanoseconds of load time, then go for it. This is also why I didn't use autoloading at all. It's so pointless for a plugin of this size.
from vim-wordmotion.
This is also why I didn't use autoloading at all. It's so pointless for a plugin of this size.
That is a good point; I didn't consider that in my haste to lazy load every plugin that I could.
Thanks for your help.
from vim-wordmotion.
Related Issues (20)
- Error detected while processing function wordmotion#init HOT 4
- cw and dw revert to default vim behavior HOT 3
- Leading underscore as non-whitespace? HOT 4
- Meta word motions HOT 31
- cw with count not work correctly HOT 1
- #define is considered two words HOT 2
- Warn users if they copied the example configurations from the README HOT 3
- Broken lsp rename HOT 3
- Wrong behavior with folds HOT 1
- cw HOT 6
- around word does not select prior separator characters.
- use vim default word definition for `WORD` HOT 4
- wordmotion_prefix not working when using Lazy plugin manager HOT 2
- Hex color codes not recognized as single words HOT 2
- Make w recognize - and CamelCase and W do what w used to do? HOT 4
- Absolutely perfect, thank you HOT 1
- Change or extend pattern to handle text end with 2 or more punctuations? HOT 2
- Last letter left for ciw command HOT 1
- I hope there could be an option to temporarily disable this plugin because sometimes I need to use the original word motion feature. HOT 2
- yank or delete support HOT 2
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 vim-wordmotion.