💾 Archived View for dioskouroi.xyz › thread › 24990658 captured on 2020-11-07 at 00:50:23. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
________________________________________________________________________________
Just like any other sort-of-Vim implementation, cw (change word) is made to be consistent with dw (delete word), and Y (yank line) is made to be consistent with D (delete line). In classic vi, these commands are illogical in that cw doesn't eat the space following the word like dw does, and Y works on the entire line, whereas D deletes only from the cursor to the end of the line. The Vim manual states that:
If you like "Y" to work from the cursor to the end of line (which is more logical, but not Vi-compatible) use ":map Y y$".
...however, I'm used do cw and Y being illogical like that, goshdarnit, so when these Vim-clones come along and "fix" it, I'm thrown off at every step I take.
I’ve never found the cw/dw case illogical. When I’m deleting a “word” (in prose or code) it’s rarely, perhaps never, my intention to leave a double space between the surrounding words. But if I am _changing_ one, the likelihood is that I’ll want to trailing space to remain after I type the replacement.
So whilst I see nothing illogical, I’m in agreement that a change to these commands would throw me!
It's practical, but it's not logically consistent with what's considered a "word" in Vim. "Delete word" and "Delete until next word" are two different functionalities, so there's an inconsistency when a function shortcut is named to represent the former, but behaves like the latter.
There's always "ce" (change until end of word), which enables the common use case and is also consistent with the rest of the vim language.
I wonder why the special case for "cw" exists... I'd love to hear the story about that initial decision.
I'd guess just because cw is much easier/faster to type (because c and e are pressed with the same finger) on a QWERTY keyboard.
Not if you're touch typing with any standard fingering I've seen. C is first finger, and E is middle finger.
You might need to look around more. The wikipedia article shows 'c' on the middle finger, like I was taught. I can't imagine doing it with the first finger, but I suppose it just depends on how you were taught.
Looking around, I can't even FIND a "c on first finger" fingering.
-
https://en.wikipedia.org/wiki/Touch_typing#/media/File:Finge...
-
http://www.typingme.com/touch-typing/typing-lesson-9.php
-
https://agilefingers.com/articles/touch-typing-finger-placem...
-
https://www.computerhope.com/issues/ch001346.htm
-
https://www.ratatype.com/learn/
and on and on.
I did watch me and my friends' touch typing behavior, and most of us use left index finger for RFCVGT(B), and right index finger for YUHJ(B)NM. the character in parenthesis means it overlaps between right and left area
That's what I do. I'm clearly wrong about the fingering charts though (I learned from an ancient DOS program, so I can't check that one). I have a picture of a symmetrical one in my head; C is the equivalent of M, so it seems like they should use the same finger.
Didn't even realize I use index finger for c until you mentioned it. Turns out I should be using my E/middle finger. Hm.
`cw` and `ce` don't do the same thing if you're on the last character of the word.
ciw does, and is what most people _really_ want to begin with.
`ciw` is a vimism, though.
I usually think of cw vs. dw as changing the data in a node vs. removing a node (together with its next pointer), in a linked list.
Interesting. I never use Y or D, I use yy and dd which both operate on the entire line. I like that they're lower case and 'fit' in my mind with their other 2 character counterparts, yw, dw etc. (and I use d$ for delete to end of line).
Not _every_ sort-of-Vim implementation (ofc). I use visÂą, which has the classic cw, but the consistent Y.
And I prefer it the vis way. cw is a binding I use often, and more pleasant to type than ce. yy I also use fairly frequently, but Y is not much more pleasant, and y$ is much less pleasant, and I copy from the cursor to the line end often enough to want it to be easy, quick, and feel nice.
Âą:
I have absolutely no idea what people are talking about in this thread. I never noticed any of this, and even went right now to test it on Vim 8.0, and nothing of what you are saying seems to be correct. I have quite a big .vimrc, but I don't think I re-configured any of this. Maybe all of it applies only to vi, not vim?
Try with `vim -u NONE` to ignore your .vimrc .
If the buffer is “asdf jkl” with your cursor at the beginning of the line, after dw the buffer is “jkl”. With the same starting buffer, after cw, the buffer is “ jkl”, with a space at the beginning (which is the same behavior as ce).
This “inconsistent” behavior is probably what you usually want, but it does indeed break the invariant that c<motion> is equivalent to d<motion>i .
> _the invariant that c<motion> is equivalent to d<motion>i_
Nit: that invariant also doesn’t work when the motion takes you to the end of the line because of how the cursor is one character wide in normal mode and zero characters wide in insert mode. On a buffer “asdf jkl” with the cursor on the letter f, c$x gets you “asd|” (| representing the cursor location), whereas d$ix gets you “as|d”.
Nice! I'm founder of workflowy and this is indeed very cool.* I've often thought about a vim-like navigation mode for jumping around.
in case you aren't familiar
Your site doesn't provide any information about price or features. It just drops a box in front of me to enter my email address - not exactly the most effective way to turn me into a customer. I might give you my email only to find out that the "free" plan is very limited, you lock my data in your garden, and upgrading to a real plan is really expensive.
Yeah, we're going to address this. A/B tests and metrics guided us to this (it converts better), and I don't know why the minimal-information thing has worked well for us, maybe it forces people to try it out. I think some of it has to do with the fact that most of it is just word of mouth, and probably our attempts at more information weren't well done.
We're working on building a library of examples with video and interactive documents that people can play with and find from the home page.
Not the op, but there is a public playground here [1] that may help evaluate the app.
https://www.workflowy.com/online-notepad/
FWIW, it takes some getting used to, but redeems itself as quite powerful once you get the hang of it.
I stayed with workflowy for long time but found that it stopped bringing in anything new at all. The community around it is writing blogs and articles about how to do this and that with workflowy. While all they do is provide how they made their own workflow to tackle a problem in a very limited environment. It like someone inventing markdown formatting for writing using Notepad more efficiently.
I moved to Dynalist and the thing I use most is its API. I have setup a custom chrome extension to save notes
and bookmarks to it with just one click. Also set it up to send links to it from my phone. Set it up with Github Actions to keep updated 'List of X' articles on my blog.
It does what workflowy does and more. I stayed with workflowy for a long time and wasn't very happy to move over but workflowy has stopped growing.
You need to take something from Dynalist just as they did from Workflowy.
What are the API features you use most and would want/need?
Also, we were frozen for a long time but have been making meaningful improvements for a while now, I’m guessing your evaluation of us not growing comes from the olden days.
As we do work on things, though, we have standards for usability and polish that are higher than Dynalist and Roam, so things take longer.
Images is a good example, which will be coming out soon. We’re just going to do a good job with it, whereas the functionality in these other tools is a little weird and feels tacked on, at least to me.
Ability to get and update any node would be great. What I don't like about Dynalist is separate files though.
I really like minimalism and polish of workflowy. It doesn't have a lot but the functionality it has was polished to perfection. Extremely fast and smooth and never gets in the way.
Although I've stopped using workflowy several years ago. Don't really know why, just wanted to explore alternatives, never found anything better, so instead my notes are divided now between half a dozen online and offline applications (Google Keep, vimwiki, etc).
I get the impression that most of the limitations of Workflowy and lack of feature additions is intentional. Sometimes less is more. I understand why some might prefer to Dynalist, though I've stuck with WF.
I'm really grateful to workflowy for popularizing the eponymous UX pattern -- mostly because it became part of how Roam works by default, with intuitive keyboard shortcuts, and it's absolutely f'ing great. It makes my life better on a daily basis and even tho I moved on from workflowy per se, I'll always feel grateful to you, jessep!
I am very interested in "workflowy offline" for Desktop. I'm unable to use Workflowy at work at all because it syncs everything to the cloud. Just an FYI.
Sorry if this is inappropriate, but for people looking for a tool like this or Workflowy, I want to suggest Dynalist, which has the simplicity of Workflowy but also a bunch more features. Cloud-based, always synced, mobile apps, easy sharing, calendar integration, etc. I'm a die-hard vim user but I still use Dynalist because it's so great.
I'm a paying user but have no other affiliation (ask me if you want a referral code though). I just want more people to use it so the creators are successful and keep improving it.
I tried Dynalist and moved back to Workflowy literally a couple of days ago. The main problem for me was that you can't link-share an arbitrary bullet and it's children — only the whole document. So if I need to share a link, I have to create a new document just for this purpose. The one-document model of Workflowy just seems more logical and simple. Although the free version of Dynalist is more complete/usable, so if you don't really care about sharing, it's better (for example, no limitation for created nodes per day).
And obviously they are both missing vim bindings, which I would LOVE to see.
That's fair. I recall reading the developers' rationale for their decision to do multiple documents and sharing at the document level. They argued that it simplified the mental model, and I'd tend to agree: when I use shared docs I want to be careful with what's private and what's shared, and the UI (the document list on the left) make it easy to do that. Almost every time I've shared something, it's been intended for sharing from the start, so creating a new document is natural. (And the one time that wasn't true, cut and paste into a new doc was just a few clicks.)
One problem with Workflowy for me was that the mobile app(s) were not very good. Dynalist's isn't great either but it's better.
Anyway, the products are more similar than they are different.
Our mobile apps have had a major overhaul, you should try them again.
How about giving an API like Dynalist?
Yeah I first found Dynalist on HN from a comment like yours about 5 years ago! I have so much of my life there
Didn't read anything at first, just went and navigated/manipulated text and it worked as I would expect! This is a very nice VIM emulation!
I stopped using workflowy because it did not feel natural to edit a large amount of plain text outside of VIM.
It reminds me how sad I was to have to ditch emacs (due to hand injuries) because I loved org mode so much. I am an avid vim user -- it was nearly my first editor -- but I wish something like workflowy or org mode could be used in vim. Kinda sad to just be using markdown alone.
You might love doom emacs. I've used emacs for 8 years and switched in July, and I can see myself using this for the next 10 years.
I tried Spacemacs, and the vim integration was so sloppy that the first time I tried to install a single package I was dumped in with unfamiliar emacs bindings, which I then had to look up to even get out of it. The integration in doom emacs is much tighter and better fitting.
https://github.com/hlissner/doom-emacs
Doom Emacs is superb :)
I keep seeing this and ... I used to have this problem in the beginning too, with the "chords of doom" (Meta + Ctrl + ...).
But what worked for me was:
(1) Remap Caps-Lock to Control: I do this mindlessly, automatically, as the _first_ step on any new laptop now
(2) Set aliases for frequently used stuff: E.g. `C-x C-m` instead of `M-x`. In general, this piggybacks on (1) above. A lot of Ctrl-? key combinations become very ergonomic, and you don't have to twist your hand into weird shapes.
Good luck! :-)
Why not use emacs with vim bindings?
I can't speak for others, but for me it comes down to work flow, vim is always 2 keystrokes away and starts instantly, and sane configuration defaults (my definition of sanity anyway..) it is available on all hosts I frequent and behaves predictably without having to sync extensive configurations.
I once tried Vim with the expectation that it would reduce keystroke count, but found that to be largely exagerated. As an example:
save in Vim:
[esc] : w enter
3 or 4 keystrokes involving two hands.
save in emacs:
C-x-s
one 3 fingered chord with the left hand.
And then I missed all the depth provided by emacs modes, perforce integration, org mode etc etc.
For me, emacs is also 2 keystrokes away and starts instantly (as long as the daemon is already running). Doom emacs has sane (good!) defaults.
My main valid gripe with emacs is the slow rendering engine.
I agree - whenever I'm on any remote host, I just use vim, but for local development, emacs + evil mode is my daily driver.
As someone who uses vim as a daily driver and emacs with evil-mode for a lisp IDE and occasional org-mode, biggest issue is every new mode you add will either use chording like emacs or will need completely new vim-compatible keybindings. It's not a _lot_ of work, but it's enough to say "eh, I just won't use that package"
Yeah, that's totally valid. It is a pain to fit everything into the evil-mode world.
I'm really good in vim too, though. I like vim. I just wish we had nice things in vim, too. Besides, vim bindings is a square peg in a round hole. There are edge cases and community momentum to think about, all of which run against the grain when nonstandard setups are used with anything, including emacs.
As someone who has only loosely dabbled with emacs and org, is there a reason that an org equivalent couldn’t exist in vim?
I know there’s vimwiki and stuff but I mean is there a reason that the full functionality of orgmode couldn’t be ported to vim (modulo some keybindings)? Does it really on having more control over the UI than just what’s available in a terminal?
I think that full org mode wouldn't work in vim, but at a deeper level, it doesn't jive with the "zen" of vim. But I'd want a solution that did.
Here's an example. Emacs has SLIME[1], and vim has like SLIME for vim[2]. The vim counterpart leaves editing in the editor but makes it easy for vim to work with terminal emulators to create a great but simple SLIME experience. It respects the "zen" of vim. I wish there were an org mode equivalent. Will be checking out vimwiki.
1:
https://common-lisp.net/project/slime/
2:
https://github.com/jpalardy/vim-slime
there is this package (unmaintained but still kind of working)
https://github.com/jceb/vim-orgmode
I tried spacemacs, but its just too unfamiliar & seems slow.
We've came around full circle - I made this few years ago
https://github.com/lukaszkorecki/workflowish
Very nice! One thing I noticed is that `}` (move-next-sibling) doesn't work if the next sibling isn't visible (i.e. if you're not showing the parent). I'd like `}` and `{` to work regardless of visibility.
This is nice vim emulation, but why not take notes in vim in the same way? It can do all the same stuff and you don't need to leave the editor. vimwiki is never more than three keystrokes away...
I've wanted to do something very much like this (vimflowy) in native vim for a while, but as a relative vim-noob I haven't found a way to do any of the following without going down the vim-plugins route:
- Instantly collapsable/expandable lists (I guess maybe vim folds by indentation could be used?)
- Open sub-list in new window
- Mark a "task" as done
- Basic text formatting (italics/strikethrough/monospace)
- Easy way to "search everything, show a list of results, jump to the context of the chosen result".
In contrast, vimflowy makes all of these quite easy and intuitive.
> - Instantly collapsable/expandable lists (I guess maybe vim folds by indentation could be used?)
Yes, `set foldmethod=indent`
> - Open sub-list in new window
This is something I'm not sure exists as a ready-made solution, you'll have to write a function for that. It's trivial for the majority of cases though.
> - Mark a "task" as done
> - Basic text formatting (italics/strikethrough/monospace)
I use vimwiki that has this, there are a lot of other ways to achieve the same.
> - Easy way to "search everything, show a list of results, jump to the context of the chosen result"
fzf.vim. The above and also supports fuzzy search.
>> - Open sub-list in new window
> This is something I'm not sure exists as a ready-made solution, you'll have to write a function for that. It's trivial for the majority of cases though.
gf (or <Ctrl+W>f for the new window version) could be useful for this, if the sublists are separate files:
https://vim.fandom.com/wiki/Open_file_under_cursor
I've tried `set foldmethod=indent`, but I've found it to be _very_ slow and it introduces a noticeable lag when typing.
I've been using The Vim Outliner (TVO) for years now, haven't found anything else that works as well for my daily workflow.
https://www.vim.org/scripts/script.php?script_id=517
This comment _strongly_ reminds me of the now-legendary Dropbox one[1]
_For a Linux user, you can already build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem. From Windows or Mac, this FTP account could be accessed through built-in software._
[1]
https://news.ycombinator.com/item?id=9224
This comment is also legendary misunderstood. He pointed out how trivial the idea was, which of course became a problem for dropbox when every tech company implemented it once they saw the demand for it and took its marketshare. Nowadays it's hard to consider dropbox as anything but a dying product of a dying company.
Taking hierarchical notes in vim conflates content with presentation/representation, which is bad.
You can fold but how would you zoom?
I guess you must be using key codes from a US keyboard, right?
The problem with that is that when on a different layout the _help_ doesn't really correspond to the mentioned keys.
I can confirm : lots of things are broken when using an AZERTY keyboard.
A big reason for using vanilla Workflowy for me is that the mobile app is quite good. It's actually ... really, really good. A lot of edit operations that I'd've had to think for a while about how to support UX for--they do a good job of. I even ran into more hiccups using Notion. It's a huge plus for me to be able to see the same "knowledge tree" both at my computer and while I'm on the go.
I love the key-feel of Vimflowy tho, and it makes me wish they could both just talk about the same underlying data store... Pairs especially well with being added to the "scratch workspace" in i3 for example.
More generally speaking about this kind of tool: Workflowy has been amazing. The zoom aspect is really what makes it what it is for me, being able to enter a context, but then also have that as part of larger one, and being able to move things so quickly too.
I had to come back and re-read this. I saw all these comments last night about Workflowy and figured I’d give it a try today. Within 5 minutes, I’ve gotten completely lost and frustrated by what should be a simple outliner.
The desktop site is a disaster on mobile, which doesn’t need to be the case in 2020, but I went ahead and installed the mobile app anyway. Aside from entering text, indent, and outdent, I’m finding nothing intuitive. I’ve finally given up on trying to drag a bullet — I finally figured out that you have to hold down on one, but when I drag and release it somewhere, it just reappears where it started. There’s no help or documentation available anywhere in the app. Much of the UI consists of unlabeled icons — what does a pencil in a square do? Apparently it adds a note underneath the current bullet.. I see from the “context menu” (swipe left, click three dots) that this is called “Add note”, and shows a keyboard shortcut next to it — shift return. Press shift return.. creates a new bullet instead of adding a note.
I feel like I must be looking at a different app. I wouldn’t describe this as “really, really good”, I would describe it as something I am giving up on and uninstalling.
Interesting, it works and continues to work well for me, but it's totally possible that I happened to see through these issues. The main thing I've liked is the ability to set any bullet as the current view root and show a breadcrumb trail of its ancestral path in the header (this whole action being called "zoom"). Have you found apps in this space that work well for you?
If anyone wants to host their own workflowy -
https://github.com/mukeshsoni/deepnotes-editor
Written in react and uses draft-js for rich text editing.
I would love for someone to send a PR which adds a vim mode like vimflowy.
Edit - Here's a version i deployed which can sync your notes to dropbox -
I used Workflowy for years, and when I used it moderately heavily it was a great tool. But I have my own tool for managing notes in vim that I prefer on the command line, enough so that I don't miss having a mobile app too much.
Over time I ended up just using Workflowy for a grocery list and it was relatively slow for that - nothing drastic, just a few seconds to load when I fired it up - so I changed to something simpler for that specific task.
Some of the most complete Vim keybindings I've experienced in something that isn't Vim.
I love that visual character/line/block selection works. It's the first thing I test in any kind of Vim emulation.
This had polluted my browser history to the point I couldn't even see HN after a few minutes of expanding bullets and playing about with it :(
Why are people so tempted to do this?
Amazing work, a little bit of feedback.
Similarly, my muscle memory for exiting insert mode in vi is ctrl-[ which does not work in Vimflowy.
Eh, I've been using
for Flowy-like task management for my team and it's been great.
Relevant here as it has single-key shortcuts for actions and is an infinitely nested task list, but unlike Flowy, works way better for _teams_, with GitHub integration, etc.
This post about their GitHub integration makes me chuckle, written by someone who heard GitHub is used for "codes":
https://quire.io/blog/p/Hello-GitHub-We-are-Quire.html
"For some of you, it is difficult enough to keep everyone up to date with the tasks at hand. It is even more so when they involve codes. Lots of codes."
"refer and trace back between tasks and codes"
I'm using Tridactyl Firefox addon and it seems it doesn't play well with vimflowy. Some keypresses are intercepted by Tridactyl and create confusion. I need to find a way to blocklist certain domains in Tridactyl.
Can't you put Tridactyl in ignore mode with Shift-Insert?
Edit: you may also find `:blacklistadd` or `:unbindurl` useful.
Whoooaaaaat, finally! The perfect combo of the two best tools in the world! :)
A similar tool with more features and partial vim binds is Checkvist, which I use (www.checkvist.com). I've been happily using it for 7 years now.
Cool, but I wonder is key remapping possible? e.g. I use ijkl instead of hjkl (because it naturally maps to my wasd and arrow-key muscle memory)
> e.g. I use ijkl instead of hjkl
What do you use for i ("insert") then? Personally "hjkl", i, esc are the last keys I'd want to remap. Though I hear some people like to remap esc to caps lock or even space. But feel sacriligious to me.
I switched "i" and "h" since "h" is no longer used for navigating left in my arrangement (that is now "j" so it matches the wasd/arrow-keys arrangement).
For esc I actually use "hh" in quick succession (inoremap hh <esc>).
Yeah, it felt a little sacrilegious when I first remapped it a decade ago, but ultimately I decided that all that was important was achieving the productivity benefits of home row navigation and ijkl does it just as well as hjkl but the ijkl arrangement was already immediately intuitive to me. For me, vim is all about the cumulative benefits of plugins and little hacks like this that optimize my workflow in a way that aligns to how my brain already thinks.
The main criticism I receive for this setup is that if I ever have to ssh into a machine that I don't control, I won't have any of my custom settings and fancy plugins, but I'm ok with this since my custom vim setup is my IDE and I wouldn't expect to have my IDE available in an SSH session if it were vscode or webstorm or whatever. Also, it's possible to edit files over ssh, and worst case scenario I just temporarily switch contexts to hjkl, but in practice I don't really have to edit code over ssh.
Should have called it “Vorg-mode“
oh man this is nuts. thank you. the copy and settings UI is so well done compared to what I see on average! I would pay for a browser New Tab version of this (if one doesn't exist already-- you seem to have thought of everything!)
looooove this. any chance we could express "select inner word", for example `viw` or `vaw`.
sorry but i'm using colmak, see you later normies!