5 ms·
The POSIX specification of vi
- wpollock 1y agoNote that vim includes a useful tutorial you can invoke by "vimtutor" on the command line or from within vim with ":help tutor"; for neovim try ":Tutorial".
- anthk 1y agoNvi has :viusage and :exusage. Vim is not POSIX vi; vim to vi it's what zsh it's to sh. Nvi2 it's closer as it has very few additions on top of vi, but it has Unicode support which can be a lifesaver if you live in Europe or Japan, allowing you to use Nvi everywhere (I do, as it's my post editor under Mutt/Slrn,Tut and so on).
- wahern 1y agoFor exploring the POSIX standard the frames version is very useful: https://pubs.opengroup.org/onlinepubs/9799919799/ https://pubs.opengroup.org/onlinepubs/9799919799/
- nickandbro 1y agoLove vi, made a Vimgolf like app called: https://vimgolf.ai https://vimgolf.ai because I like vi so much. Although the app uses neovim underneath the hood because it had an easier API to work with.
- BipolarCapybara 1y agoGreat site! I've been wanting to learn it for the past couple of weeks, but didn't have enough motivation to sit trhough tutorials. +1
- Onawa 1y agoI learned vi(m) using https://vim-adventures.com/ https://vim-adventures.com/. It's $25 US for a 6-month license, which is a bit short. But I felt I got my money's worth out of it and continue to use and love vi(m) to this day.
- nickandbro 1y agoBig fan of vim adventures too! It definitely gamifies the learning of vim. Mine is more for the vim enthusiast who want to measure up against other vim power users.
- nickandbro 1y agoThank you! It’s an unfinished project of mine. Still looking at adding more levels and allowing users to upload their own.
- jmholla 1y agoOnce you're the slightest but comfortable navigating vi, I highly recommend Practical Vim. [0] It tooke me a few days to get through, but I'm 100% in vim these days and more effective in it than in my old primary editor PyCharm. [0]: https://pragprog.com/titles/dnvim2/practical-vim-second-edition/ https://pragprog.com/titles/dnvim2/practical-vim-second-edit...
- cocoa19 1y agoCan I suggest dropping the sign up requirement and email verification to try it out?
- nickandbro 1y agoI agree! I am just working the containerization of the vim instances. Right now using k8, but wasting $$$ on infra. Moving to cloudflare containers to save that $$$ and make it more available. In the mean time, temporary email sites are allowed and not black listed.
- rdancer 1y agoMarvellous! :w<CR> should count the same as ZZ for the purposes of hiding better solutions, else it's fairly easy to walk up the leaderboard even though the better solutions are ostensibly hidden.
- nickandbro 1y agoThanks, appreciate the feedback
- anthk 1y agoSpawn vi or nvi (nvi2 under OpenBSD, it has unicode). Then, press [esc] and run: :viusage [Return] [Esc] :exusage[Return] Now you know the basics. Viusage: keyboard commands while in editing mode. Exusage: typed commands for the command (:) mode.
- Joker_vD 1y agoUgh, all this crazy head-spinning cursor commotion... I'll just keep using ed, thank you very much.
- n3t 1y agoYeah, it's just better to stick to the standard editor.
- chongli 1y agoJust start ex instead. Command-based line editing without the hassle of a cursor.
- fuzztester 1y agoCOPY CON ... on DOS, bro. nuttin else comes close or if ur 2 weak, edlin.
- EvanAnderson 1y agoI actually use "COPY CON" a fair amount. Also a decent amount of "cat > foo.sh".
- fuzztester 1y agoHa ha. Same here. Also, in shell, >file can be used to delete a file, IIRC. Not at a Unix box right now, so can't check. And: echo * is the poor man's ls command, as in, "poor man, his Unix OS is corrupted , and many commands are missing". And similarly dd is that man's cat command. :)
- fuzztester 1y agoyes, it makes sense in some situations, because if all you want to do create a small batch (.BAT) file of a few lines, and you are a careful / good typist, the COPY CON method can be a lot faster then firing up your favourite editor, even a fast one like vim, to create the file, save it and exit. and the same applies for UNIX.
- 1y ago
- haunter 1y agoHuawei EulerOS is one of the few POSIX compliant Linux distros, but it’s a commercial one [0] But it has a FOSS release, openEuler [1] I actually want to download it now to check if the vi there is really that POSIX version 0, https://www.opengroup.org/openbrand/register/brand3622.htm https://www.opengroup.org/openbrand/register/brand3622.htm 1, https://www.openeuler.org/en/ https://www.openeuler.org/en/
- ksherlock 1y agoWikipedia says it's based off RHEL and this[1] suggests it just vim. 1: https://dl-cdn.openeuler.openatom.cn/openEuler-25.03/source/Packages/vim-9.1.1019-3.oe2503.src.rpm https://dl-cdn.openeuler.openatom.cn/openEuler-25.03/source/... Are they actually UNIX Conformant? That PDF just says they've entered a trademark license agreement. They're not listed in the conformance database. https://www.opengroup.org/csq/search/t=XY1.html https://www.opengroup.org/csq/search/t=XY1.html
- ksherlock 1y agoFWIW, OS X uses vim so if any of the conformance tests check, it can be made to pass. Solaris, AIX, and probably everyone else use the BSD/AT&T vi.
- skissane 1y ago> Are they actually UNIX Conformant? That PDF just says they've entered a trademark license agreement. They're not listed in the conformance database. They were an official UNIX – https://www.opengroup.org/openbrand/register/brand3622.htm https://www.opengroup.org/openbrand/register/brand3622.htm – but they aren't any more. To be an official UNIX, you need to both pass the test suite and pay the trademark license fee. And the license fee needs to be renewed once every X years. And if you don't pay the renewal, you are no longer an official UNIX, even if you still pass all the tests. This is why Solaris is no longer an official UNIX – someone at Oracle decided paying UNIX trademark license fees was a waste of money, so they stopped – and hence Solaris is no longer officially UNIX any more. An I'm pretty sure the same thing happened with Huawei EulerOS. Probably someone at Huawei realised that zero customers cared whether EulerOS was officially "UNIX", and hence decided that paying the renewal was a waste of money. And they are probably right about that. 30 years ago, being officially "UNIX" or not could be a deal-breaker, nowadays I doubt a single customer cares.
- chasil 1y agoYou can see all the userland utilities by removing the "vi.HTML" suffix from the URL. https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ https://pubs.opengroup.org/onlinepubs/9799919799/utilities/
- anthk 1y ago>mailx mbox should die; or maybe set as a legacy option. Current systems can handle thousands of email by using maildirs. Also, one day bsdgames will enter into POSIX maybe but as a test case, in order to be sure on how well the POSIX compatible API behaves. Phantasia(6) could be rewritten for balance and such...
- wpollock 1y ago>mbox should die; Mbox is useful for backups and for migration between different email systems (that use different databases internally). Mbox is also fine if you only have a hundred or so email folders and only process a few dozen emails a day, say for personal use (e.g. Thunderbird or k9). I agree that mbox is not okay for large scale mail servers. Maildir+ works much better in such cases.
- anthk 1y agoSo does Maildir; reusing it between Mutt and GNUs or Claws Mail should be a child's play. Once you have tar to preserve perms just in case, your are done. Mbox on big mailboxes it's hell, anyone can understand that linear parsing will be slow as hell. It's like looking up a word file in a dictionary word by word from A to Z instead of directly heading to the first word letter...
- userbinator 1y agoIt's notable that vi has been specified by POSIX (along with ed and ex), but not emacs.
- spauldo 1y agovi was born on UNIX early enough that every UNIX wound up with it. Emacs was born on mainframes and made its way to UNIX much later, after vi had already become the standard.
- anthk 1y agoThis. Emacs came from GNU which GNU is not Unix; Emacs it's a tool to give Unix users freedoom (and a Lisp, OFC) from the Lisp Machines RMS used to use. Also, Emacs it's really huge, the closes to a "Posix Emacs" would be mg, as it's included under the OpenBSD base, but sadly it doesn't support Unicode. If it supported it, tons of Emacs users would use it as a quick editing tool, as 'mg' still launchers faster than 'emacs -nw -Q'. And, as you said, Emacs and Lisp were for big machines, and Emacs it's like psychodelic/progressive rock: something to freely experiment creatively without machine restrictions. If you improvise "live", as jazz masters do (Lisp Machines), the better. Unix would be like techno music from Kraftwerk: simple but well made beats and samples -machine made-, repetitive, they sound automated. But once they are put together they create something new and brilliant. Some people remix these samples and they create crazy stuff like the songs of The Avalanches, too. Kinda like Unix orthogonality between small tools and pipes. Very different philosophies, but mixing GNU (Unix clone) and Emacs (Emacs from ITS was distinct from GNU Emacs) created something really powerful. For instance, you could automate mail and usenet fetching and sending data in the background with daemons (freeing resources for Emacs and unblocking I/O) and hack the frontend/parsing code like crazy, Or Telega, with telega and telega-server as the daemon to talk with Telegram, or even something like Mu and Mu4e for Email. Or simply, EMMS calling mpv in the background for audio and video playing -you can watch movies fom Emacs- (and mpv itself to yt-dlp for online videos) seamlessly. In the art world, that would be like industrial music, a mix between automatization and improvisation, and, FFS, Ministry and some Prodigy songs were 100x better than Techno subgenres and every Hair Rock and Heavy Metal band with the same poses and tropes everywhere...
- eviks 1y ago> Move Down > Synopsis: > [count] j Why would you ever specify configurable shortcuts? Does is break posix when a user changes them?
- porridgeraisin 1y ago> Does it break posix A vim that ships out of the box with different shortcuts than those -- I presume yes. But if the user configures them then it's upto them I guess. Just like a user can swap around /bin/cat and /bin/echo.
- gpvos 1y agoNote that vim is not POSIX-compliant, as it has no open mode. Open mode is a kind of single-line visual mode. I actually used it quite a bit over a 1200-baud modem line.
- webdevver 1y agoposix to linux is what web standards are to chrome