[HN Gopher] 20 Years of Vim
___________________________________________________________________
20 Years of Vim
Author : mpereira
Score : 168 points
Date : 2023-08-12 13:02 UTC (9 hours ago)
(HTM) web link (www.contextualize.ai)
(TXT) w3m dump (www.contextualize.ai)
| rc00 wrote:
| Can we do the same thing for X11? (Turn it into something new
| while maintaining its spirit.)
| pmoriarty wrote:
| Of course. All you have to do is find people willing to do the
| work.
| zabzonk wrote:
| for me, it is more like "40+ years of vi". vim is simply the best
| version of all of the vi-based editors that i have used, across
| many platforms. vim is brilliant (and i am very sad to hear of
| the author's death), but i think we really owe it all to bill
| joy.
| pydave wrote:
| Vim's addition of .vimrc and .vim allowing you to store editor
| programs to further accelerate your editing makes stand vim far
| beyond vi.
|
| Credit Bill Joy for the modal editing paradigm, but vim is so
| much more than that. Most editors have a vi mode, but they
| don't compare to vim because they are awkward to script and
| don't have _powerful_ regular expressions so readily available
| (both introduced in vim).
|
| We could thank Ken Thompson and Dennis Ritchie for enabling vi,
| but I thank Bram for keeping vi viable, portable, and well-
| supported across languages.
| zabzonk wrote:
| not sure thompson or ritchie ever used vi, or really enabled
| it. it is quite similar to the text editors on vax.
| bluenose69 wrote:
| Same for me: vi (later vim, later neovim) since the late 1970s.
| I used ed in the early days, too, and that may be why I love
| the fact that vi* lets me type ":" to do powerful things.
| zabzonk wrote:
| i had to teach a C programming course that used ed as the
| editor because i could not at the time get vi/ex to work
| because of terminfo/termcaps and other problems (which i
| later fixed). also bourne shell. students, who were on a
| basically business oriented IT course in about 1985 (?) never
| complained.
|
| try inflicting something like that on people now, though it
| might be good for them.
| kazinator wrote:
| Vim goes back to 1988, publicly released in 1991.
|
| I've been using it for 29 years now.
|
| The last 20 years don't mean anything; the Vim codebase is too
| much of a dumpster fire for anything significant to happen in
| that time span.
|
| They had to fork an entire parallel command set to implement
| "location lists" (new in Vim 7, I think) which are exactly like
| the "quickfix list". Most of the difference are that location
| list commands start with l, wheras quickfix list commands start
| with c. Your keybinding to go to the next quickfix item doesn't
| work in a location list because it uses :cn^M, but the location
| list wants :ln^M or whatever. The only explanation for this
| ridiculous state of affairs must be that it was too difficult to
| extend quickfix lists to do the things that location lists do.
| Once you get into the Vim codebase, that will not be surprising.
|
| Vim's visual editing semantics assumes that you have a block
| cursor, and that that the character covered by the cursor is
| included in a visual selection. This is not so nice when you
| switch your terminal to an I-beam (or vertical line) cursor,
| which references between characters. If the cursor is to the left
| of the selection start, it includes the character to the left of
| the cursor too. I-beam semantics allows for a zero-length
| selection, whereas in block semantics, there is always at least
| one character in the selection, which is the one under the
| cursor. I-beam semantics is virtually what pretty much all GUI
| editors do, including the text widget in Firefox I'm using now to
| type this.
|
| A bunch of years ago I looked into what it would take to have a
| flag in Vim to flip to I-beam semantics for selection. Gack! I
| estimated a month of full time work. Numerous places in the code
| would have to change in ways where you're not sure what side
| effect they will have elsewhere.
| lachlan_gray wrote:
| You could maybe switch to a block cursor when you're in visual
| mode with
|
| let &t_SI = "\e[6 q" and
|
| let &t_EI = "\e[2 q"
|
| in some auto commands to sort of address this
| pydave wrote:
| > Your keybinding to go to the next quickfix item doesn't work
| in a location list because it uses :cn^M, but the location list
| wants :ln^M or whatever.
|
| Navigating quickfix and location lists is global, so a single
| common command wouldn't make sense (you can use `:cn` from any
| window -- even if the quickfix is not visible). However, you
| could use a `<buffer>` map to use the same key to navigate
| _within_ loclist /quickfire windows.
|
| > The only explanation for this ridiculous state of affairs
| must be that it was too difficult to extend quickfix lists to
| do the things that location lists do.
|
| Their entire concept is to be what quickfix isn't: instead of a
| global list, it's a list that's tied to a window. I can't think
| of features that a loclists have but quickfix doesn't unrelated
| to their nonglobal nature.
|
| I can't claim vim's code is easy to understand, but this is not
| a fair complaint.
| bongobingo1 wrote:
| Would like to see this with the #lines/changes per commit. Its
| obvious that there are more commits post neovim, but i wonder if
| they're more substantial or just a change in work flow (eg:
| previously 1 commit with 3 lines, later 3 commits with 1 line
| each).
| pawelduda wrote:
| After neovim was released, I could feel the pace pick up,
| subjectively
| loeg wrote:
| Neovim allowed innovation that vim initially stifled, and its
| success motivated Vim to catch up. I think the fork has been
| good for Vim.
| Icathian wrote:
| I wonder why that is. Just a bigger tent, with some of the
| benefits being committed back to vim? More pressure to bring
| in features from neovim pushing the pace faster? I'd be
| curious to hear an explanation if anyone has one.
| pawelduda wrote:
| IIRC there was pushback from vim devs to implement async,
| so neovim did it. Shortly after async also made it to vim
| xwdv wrote:
| Just goes to show when devs push back, push harder.
| im_lince wrote:
| great tool ever
| VectorLock wrote:
| I had a subtle bit of wistfulness every time I fired up vim for
| the first time every morning this week.
| I_am_tiberius wrote:
| I love vim and neovim but I wished there was an easier way to
| define the config.
| crickey wrote:
| :e $MYVIMRC Your welcome
| wodenokoto wrote:
| > The hard work from maintainers turned Vim into a completely new
| editor
|
| In what ways has vim become a completely new editor?
| webnrrd2k wrote:
| In an editor-of-theseus way? At least that's how I took it.
| [deleted]
| pxc wrote:
| It's impressive to me how much Vim's development has continuously
| accelerated throughout the lifetime of the program so far. We
| might think of it as an 'old-fashioned' tool, but it has really
| flourished and grown a lot on the last several years.
| amelius wrote:
| Is anyone keeping track of what the most popular Vim commands
| are?
|
| Personally, I've been using Vim for years, but I must confess
| that I use almost the same commands as I did in the beginning. Is
| there any good website that teaches useful tricks, maybe on a
| daily basis?
| JNRowe wrote:
| I really can't recommend Drew Neil's resources enough. The
| vimcasts1 series are great if you're the sort of person who
| likes videos to learn with, and both his books are excellent23.
| [The books may _appear_ to be getting a little long in the
| tooth, but their contents are still very applicable to today 's
| usage.]
|
| My own "trick" for improving my vim usage was to start mapping
| things to <Nop> that have better replacements, it is a great
| way to shock yourself out of bad habits like hjkl movements or
| reliance on /. Then again, I think text-objects and the items
| below it in motion.txt are the _main_ to use vim so YMMV.
|
| 1 http://vimcasts.org/
|
| 2 https://pragprog.com/titles/dnvim2/practical-vim-second-
| edit...
|
| 3 https://pragprog.com/titles/modvim/modern-vim/
| amelius wrote:
| Thanks! Now I'm curious what is bad about hjkl movements :)
| JNRowe wrote:
| I perhaps shouldn't have said "bad," as my opinions _sadly_
| aren 't universal truths ;)
|
| However, my reasoning is the same as noted in echelon's
| reply. There are often far better ways to move around as
| described in ":h text-objects" and ":h motion.txt" more
| generally.
| smackeyacky wrote:
| So am I. Not all terminals actually had cursor keys.
| fortunateregard wrote:
| https://github.com/m4xshen/hardtime.nvim
|
| https://github.com/takac/vim-hardtime
| echelon wrote:
| You tend to overuse arrow key-like navigation instead of
| developing chords of movements.
|
| I got stuck in that suboptimal mode and had to break myself
| of it.
| bashgordon wrote:
| So... How do we help children in Uganda?
| simonjgreen wrote:
| Bram founded ICCF Holland https://en.m.wikipedia.org/wiki/ICCF_
| Holland#:~:text=Vim%20i....
| mpereira wrote:
| Check out `:help uganda`.
| xnx wrote:
| Cool tool! I had to double check because I thought Vim was much
| older. Indeed, Vim goes back to 1991
| (https://en.wikipedia.org/wiki/Vim_(text_editor)). This is a
| great view of the last 20 years of Vim.
| mpereira wrote:
| Thanks! I just added a hopefully-clarifying comment before the
| chart based on your comment.
|
| > This chart shows the last 20 years of development as seen in
| the Vim git repository.
| daveguy wrote:
| And to be thorough... The original vi mode of text editing goes
| back to 1976.
|
| https://en.m.wikipedia.org/wiki/Vi
| loeg wrote:
| Right, this is just the history after moving to git. Hence
| starting with Vim 6.x and 0 git commits.
| rangerelf wrote:
| Vim in '95 was a breath of fresh air: improved feature set over
| plain vi and still zippy.
| pmoriarty wrote:
| There were a bunch of other vi alternatives back in that day.
| vim was just the one that wound up becoming the most popular.
|
| nvi and vile were two names that spring to mind, but I know
| there were others.
|
| Looks like vile itself started in 1992:
|
| https://invisible-island.net/vile/
| orhmeh09 wrote:
| nvi came standard on FreeBSD at least through 5.x, iirc.
| mpereira wrote:
| I used data from the Vim git repository to create an annotated
| chart of some of the main moments in the last 20 years of Vim
| development.
|
| Vim was the first text editor I've ever used (back in 2008), and
| it shaped the way I interact with computers forever. I'm grateful
| to all maintainers, and to Bram for creating it and shepherding
| it through all these decades.
|
| The annotations are interactive, so if you hover them you'll see
| more context about the events.
|
| I built the tool to make this visualization:
| https://www.contextualize.ai
| mekster wrote:
| > Vim was the first text editor I've ever used (back in 2008)
|
| How could anyone skip any other more "normal" editors and jump
| right into Vim?
| mpereira wrote:
| I'm weird, I started using computers with Arch Linux and Vim
| :P
| berkes wrote:
| I was thrown into vi, back in 1996, learning Linux. It was
| the default (or at least available) and the SuSE manual that
| came with the CD-ROM box had a chapter on vi/vim.
|
| For me it was my first editor on Linux. Didn't stick until I
| rediscovered it some 20 years ago when I got fed up with the
| netbeans nonsense and gedit and Kate kept breaking on me.
| [deleted]
| rangerelf wrote:
| What was a "normal" editor in '08?
|
| After trying out finger-twister with Emacs, vim was a breath
| of fresh air, and had better features than plain "vi", like
| it was improved or something.
|
| Now, how do I save and exit?
| loeg wrote:
| Notepad++ (Windows, 2003) / gedit (GNOME, 1998) /
| kwrite/kate (KDE, 2001) all existed in 2008 and are totally
| fine basic text editors for source code. I remember editing
| PHP in a more obscure editor (SciTE, 1999) on Windows in
| the early 2000s.
| rangerelf wrote:
| Most of all those are gui based, when running a small
| Slackware setup without X none of those are available.
| rob74 wrote:
| You might be surprised to learn that the original version
| of Vim (on the Amiga: https://www.reddit.com/r/amiga/comm
| ents/l5j53m/the_text_edit...) was a GUI based
| application! Ok, it didn't have much in the way of an
| actual GUI, but it ran in a window which wasn't the
| shell/CLI window. I guess the actual reason why Vim is a
| console application on Linux is the lack of a "standard"
| GUI framework.
| loeg wrote:
| > I guess the actual reason why Vim is a console
| application on Linux is the lack of a "standard" GUI
| framework.
|
| gvim (for GTK/Gnome) is an official part of vim!
| IshKebab wrote:
| How many people's first experience of computers is a
| small Slackware setup without X? This thread is
| hilarious.
| loeg wrote:
| They're all GUIs. Most people using computers in the late
| 2000s were using GUIs, not X-less Slackware. You asked
| what "normal" was -- this is normal.
| eimrine wrote:
| Using GUI doesn't mean not using CLI.
| loeg wrote:
| This is not responsive to my comments.
| jodrellblank wrote:
| https://en.wikipedia.org/wiki/Comparison_of_text_editors
|
| Sort by creation date, notepad, kedit, kwrite, notepad++,
| Scite, and plenty more.
| bee_rider wrote:
| When do most people use text editors? I think wouldn't be
| that surprised if somebody fist used a text editor when they
| first got into Linux or programming.
| sodality2 wrote:
| I'd imagine most people's first impression would be Notepad
| on windows- I wouldn't count Word or even WordPad.
| kingkongjaffa wrote:
| It was definitely notepad to edit some obscure .ini files
| on some pc game, or reading a Readme on a cracked/pirated
| game. On windows that would be the obvious case.
|
| Downloading something over limewire or torrent and seeing
| a readme file for the first time is a pretty strong
| memory.
|
| My first IDE was visual studio writing Visual Basic, I
| quickly binned that for netbeans and Java and then I
| think ended up using Eclipse.
|
| Today I'm a casual evil mode emacs user mostly for magit
| and org-mode. also working in VScode for web languages.
| bee_rider wrote:
| I bet you are right.
|
| But, I also think there's enough leeway in the idea of
| "using a tool" to not be surprised that somebody doesn't
| count a one-off use of notepad. And I think there must
| exist at least some people who really never used notepad.
|
| Nowadays I only assume someone between, like, 30 and 50
| will inherently have to have used Windows at some point.
| Outside that range, you might get graybeards who were
| around before Windows, or younger folks who only ever
| used smartphones.
|
| Anyway, all that rambling is to say, I'd put it in the
| "most but not shocking to hear otherwise" category.
| Eddygandr wrote:
| Do you really think people younger than 30 won't be using
| Windows in school or at home?
| xwdv wrote:
| They will use it, but they don't know it's Windows or
| what an OS is. They'll just say it's a Microsoft computer
| or PC. Or "not Apple". Maybe even Android.
| [deleted]
| bee_rider wrote:
| I mean, there exist and have always existed people who've
| never used it at home. And there exist and (ever since it
| came out) have existed people who have.
|
| What I've tried to express is that there's a small band
| where not having used it is unusual and surprising, and
| that isn't the case anymore. I still think the majority
| of people have used Windows at least a handful of times
| but hearing that somebody hasn't no longer produces a
| "how could anyone" sort of response.
| mattl wrote:
| Like what? ed?
| cristoperb wrote:
| I think they probably mean a non-modal visual/screen editor
| (like NotePad on Windows or TextEdit on Mac). I used pico
| on Unix before learning vi, for example, which is probably
| a common progression.
| lcnPylGDnU4H9OF wrote:
| > The annotations are interactive, so if you hover them you'll
| see more context about the events.
|
| It would be helpful to put this somewhere on the page. On
| mobile especially one isn't likely to accidentally discover
| this with random mouse movements.
| jes5199 wrote:
| that's fascinating and to me, because as a vim user since 1998, I
| haven't really consciously noticed it changing much.
|
| If I tried running a version from 20+ years ago, today, would it
| still work on a modern O/S ? Are there modern vim features that I
| would miss?
___________________________________________________________________
(page generated 2023-08-12 23:00 UTC)