7
Aidan Hall / Vile · GitLab
source link: https://gitlab.com/aidanhall/vile
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
A proof-of-concept Emacs package for “Vim-like” editing. It turns out the concept was not so good so I probably won’t work on this further. Sorry!
See the documentation string for some rationale.
Features
Simple Keybindings
Cursor Movement [6/9]
- [X] hjlk
- [X] HLM
- [X] gj, gk: Logically opposite to Vim’s meaning of them, as Emacs behaviour is preferred.
- [X] w, b, W, B: W and B use {forward,backward}-sexp,
since this is comparable to the
M-f
-C-M-f
correspondence. - [X] i, a, I, A, gI, gA, 0, $, ^
- [ ] s, r
- [X] gg, G: Hard-coded to
beginning-of-buffer
andend-of-buffer
currently, which I deem acceptable since I assume that’s all most people use these for anyway. - [ ] e, E, ge, gE: Some of these may be unnecessary
because of how Emacs’
forward-word
positions the cursor. - [ ] %: I’ll only do it if I can find a built-in function for it.
Potentially made redundant by
W
andB
being bound to sexp navigation.
Editing [8/10]
- [X] u, C-r
- [ ] dd, cc, etc* (see *Motion System).
Searching [3/3]
- [X] f, t, F, T
- [X] ; and ,
- [X] /, ? and
*
: Currently put cursor after match instead of beginning, although the solution will be trivial.
Motion System
- [ ] <command> <motion> input style: Possible implementations
- [ ] <motion> <command> input style (more similar to Kakoune):
- Potentially easier to implement; supposedly a more elegant design.
- Essentially already implemented by pressing v to set the mark first.
- [ ] Line-wise operations
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK