Re: [dev] [RFC] Design of a vim like text editor

From: ale rimoldi <>
Date: Tue, 23 Sep 2014 20:03:45 +0200

hi marc andré

as announced a few days ago, here is my write down about vis.

you probably won't agree with each point in there...

for many years now, i've been using vim as my main text editor. both for code and for typing text.

while i consider myself a vim heavy user, when i browse through the vim manual, i have to accept the fact that i probably do not use more than 10% of the features.
it's proably rather around the 1% or 5%, but i don't see a way to really count it...
and this bothers me: how bloated is a software when a heavy, and curious, user only knows (and cares about) a tiny fraction of the features?

(something maybe important to say: i use vim as distributed, with no plugins, with very few lines in the .vimrc file)

on top of that, while i never had a look at the vim source code, i've read scaring tales about it.

this made me curious about how "good" a suckless version of vim would be for me.

and while testing vis, i started fearing that each of the many heavy users out there uses a different small subset of all the vim goodness: this could explain, why it's so bloated. let's hope that it's not true.

i did a vis test drive, i was rather happy with the result, but i also noticed many "every day features" that are missing... and a few ( really not many) bugs.

and i also found some features that i liked to see not implemented (like U, the linewise undo; ex; K)

here in details the result.

first, there are two features that you explicit do not plan to implement but are (very) important to me

- macro recording (really really really... except if you implement multiple selections... but even then... or at least macro playback!)
- visual block mode (very practical for reformatting text; sometimes useful for code, too)

the four "bugs" that most annoyed me while typing this text with vis:

- o does not go into insert mode (how easy it is to switch my habits to oi?)
- a does not append
- end of line is not the last char in the line but the end of line character
- P does not paste before

and here the only real bug i noticed:

- <count>> indents count+1 lines

and then there is a longer list of commands i really missed (i mean: things that really slow down my workflow and i'd probably need all -- or at least most -- of them, if i want vis to to replace vim...
some of them have already been mentioned, other not.

:sav filename

expandtab mode with :set ts and :set sw; eventually :retab
:se si for smart indenting
== automatically indent the current line
automatically insert the comment sign at the beginning of the next line (it's about the #s and *s)
:paste :nopaste modes (if the commands above are implemented)

zt zz zb redraw the current line at the top, center or bottom of the screen

o O should go into insert mode after adding the line
a appends at the current cursor place
. should also repeat insert actions
$ should jump to the last char in the line not on the hidden return char
in normal mode, when the cursor is at the end of the line it should be on the last char.
x should not delete the end of line character (but this might be solved with the placement issue above)
implement the difference between word and WORD

allow changing buffer without first saving the current buffer
:b# go to the previous buffer
:bd to delete a buffer
:ls list of buffers
:bd <int> delete <int> buffer
:b <int> go to <int> buffer
:vnew :new to create new windows
ctrl-w lhkj to move among windows

in command mode, deleting the : should go back to normal mode
up and down arrows / ctrl-n/p to browser the command mode history

in insert mode ctrl-p and ctrl-n should propose an autocompletion with all known words from the open buffers

:! to run a command
!! to run a command and insert its result as the current line

dd does not work on the last line
pasting a full line should put the cursor at the beginning of the pasted line
P should paste before the cursor
xp should switch the position of the characters at the cursor

gU and gu for uppercase and lowercase
g0 gm g$ moves to the begining/center/end of the screen line

V for line selection
ctrl-v for visual block selection

q to register macros
_AT_ to play macros

gk / gj should keep the last set column (if it moved to a shorter line and then again to a longer one)
<num>gg should go to <num> line
ctrl-o and ctrl-i should jump to the previous cursor position (if possible, only inside the current buffer)

show where the file content ends (the vim's ~, but it can be solved in a different way!)

/pattern/e modifier to move the cursor to the end of the match
,; for the next/previous match in the character find
* finds the next matching word

and here a few nice to have:

- digraphs
- "special" registers (calculation, current filename)
- inserting registers with ctrl-r (ctrl-r% inserts the filename in the file itself)
- optional syntax highlighting
- i'm not sure that having j/k behaving like gj/gk is a good idea
Received on Tue Sep 23 2014 - 20:03:45 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 23 2014 - 20:12:07 CEST