6 ms·
You've oddly crystallized why Kakoune has so far failed to grab me! The description you gave of the actions one takes in editing makes sense: in most non-modal
by chipotle_coyote 5y ago
You've oddly crystallized why Kakoune has so far failed to grab me!
The description you gave of the actions one takes in editing makes sense: in most non-modal editors, you select the text you want to take actions on, then choose the action to take. But, I can do that in literally every modeless editor! That's the way essentially all of them work.
But when people write of "Vim as a text editing language" as many comments here do, the action -> object model -- again, at least for me -- fits the pattern. We say "I'm going to the store," not "store I'm going to," unless Yoda we are. And, most programming languages that aren't purely object-oriented tend to follow a rough pattern of "action(parameter)". So in editors like Sublime Text (or VSCode or BBEdit or...) I tend to do editing in an entirely visual way, Vim approaches editing in a more language-based way, and when you describe edits in language, "[verb] the [noun]" is pretty natural.
- bombela 5y agoI tend to pick and measure a piece of wood before turning my saw and cutting. I say that I am cutting the wood. But I select it first before marking it and cutting it. I noticed that I use the visual mode of vim a lot. With easy motion to highlight words or other object boundaries to quickly jump to. I tried kakoune and liked it. But after 15y of (neo)vim it's hard to change. That plus how good You completeMe is for vim.
- addicted 5y agoWell, the reality is that WYSIWYG editing of all sorts is object oriented. You first select the object and then the action. So it’s not clear whether being more comfortable with selecting an object and then performing an action on it is innately easier for humans, or just what we’ve been conditioned to from using word processors, spreadsheets, or even GUI based file explorers. But if you look at command line usage, it’s the opposite. Every command first requires you to stare the command, and then the object to act on. I first type cd and then the folder I want to change directory to, compared to selecting the folder and then hitting enter/CMD+O/double clicking ont he GUI. But people who have used both the GUI and CMD line rarely ever find the order of operation to be a concern for them, so I suspect the object-verb verb-object difference in vim is just a matter of convenience.
- bombela 5y agoI do woodworking and construction work. In real life, I always must select first. Apply action second. So to me this feels more natural.
- addicted 5y agoI think you’re overestimating how well real life actions map to the object/verb dichotomy. So you’d say that it’s object first because you first get the wood and saw and then decide to saw the wood with it. I could argue it’s verb first because you first GET the wood and saw. I’m not saying that I’m right and you’re wrong. In fact, quite the opposite. My point is that I don’t think real life actions can be broken cleanly into object-verb or verb-object, in the first place.
- pessimizer 5y ago"I need to GET something. I know, I'll GET some WOOD." "I need some WOOD. I think I'll GET some WOOD."
- deleted 5y ago[deleted]
- jrek 5y agoI think this supports the point - in either case the syntax for the action is 'get wood'.
- ZoomZoomZoom 5y agoThis whole back and forth in this subthread is ridiculous. People are comparing command syntax (not even a proper PL) with natural language syntax. First one is used to define actions first and foremost, and the second one to describe them. How we formulate our actions in our head/speech to describe them is mostly irrelevant here.
- bashinator 5y agoI have an almost entirely non-visual imagination and internal narrative. Vi and then vim were pretty easy to adopt, and it’s still easy for me to learn new editor-as-a-language functionality. I started using it in the 90s and only figured out the visual stuff in the past few years (for block editing).
- bombela 5y agoThat is maybe the key point here. I am the total opposite of you. A friend of mine is like you and he thrives in vim.
- bashinator 5y agoI think it's a wonderful thing that the IT ecosystem has created such a variety of different tool methodologies converging on the same purpose. It seems analogous to convergent evolution in biology.
- greydius 5y ago> "[verb] the [noun]" is pretty natural For an English speaker. There are many human languages that put the verb at the end of clauses. Japanese is one example.
- 0x98 5y agoLots of Asian languages have the nouns before verbs.
- cnasc 5y ago“Go to the store” is the action and “I’m” is the object, so your example supports the Kakoune case not the Vim case (These are also English-specific justifications)
- joppy 5y agoIt is pretty common nowadays in functional programming languages to find operators which reverse the order of application or composition, so rather than writing f(g(h(x))) one can instead write “x |> h |> g |> f”. This style is quite popular, which leads me to believe that many people prefer object-action over action-object in same way. (Although perhaps this is more a critique of action-object-object vs object-action-action)
- themulticaster 5y agoWhile you didn't refer to any explicit programming language (so your example is correct by definition), I think you may have mixed up something. The order is reversed, but typically not in the way you describe. For your example of f(g(h(x))), you would write (f . g . h) x in Haskell. So for this particular example, the syntactical order is not reversed. However, you could say the natural order of reading is reversed: The naive way to read (f . g . h) might be "first f, then g, then h", opposite the actual order of execution.
- losvedir 5y agoI'm assuming they were talking about Elixir, which uses that syntax to pipe the result of the left side into the first argument of the function on the right side. The transformation was correct in Elixir, and I can confirm that I at least do think that way.
- nextaccountic 5y agoThis x |> h |> g |> f syntax is Elixir (and F# perhaps? and surely other langs). In Haskell this is written x & h & g & f And in shell script, this is written echo x | h | g | f This operator is sometimes called the pipeline operator Anyway, here is some ghci session exemplifying the usage of the & operator $ ghci λ import Data.Function((&)) λ a f g h x = x & h & g & f λ b f g h x = (f . g . h) x λ c = f g h x = f (g (h x)) λ a (+ 1) (* 2) (+ 3) 1 9 λ b (+ 1) (* 2) (+ 3) 1 9 λ c (+ 1) (* 2) (+ 3) 1 9 It's unfortunate that this is named & in Haskell and not |>. And what's worse, it's not in the prelude.
- OJFord 5y agoIn English, sure. Not in Hindi for example (मैं खाना खाता हूँ - 'I food eat') or in .. object-oriented methods of many programming languages. I don't think there's anything special about that mapping, whichever way around. I'm not inclined to think I'd perceive things or act any differently if my main way of describing things (English) had a different grammar - a rose would smell just as sweet. I can see some value, especially for beginners, in 'highlight while object selecting, then act' (which you can do in vim with visual select and then action, e.g. instead of c2w do v2wc - or v2w -wait no that's not what I want-). I do prefer it as it is though, probably just because I'm used to it, but I think of it as 'up to' rather than 'define the object', since it is always anchored (at least, without any plugins doing differently like is being discussed with Treesitter here, adding context awareness) by the cursor position. So I'm thinking 'change from here to..'. I suppose if one wants to think about 'object first' you could argue vim already is that anyway - you move to the object before typing any of the command.
- dsego 5y agoSome languages use both orders, and the difference is more of a stylistic choice.
- claudiawerner 5y agoLatin has an extremely flexible word order (some of which Old English had too) which allows all kinds of fun stuff for style and communicating status/education. Japanese with its particle system also allows some good flexibility.
- javier10e6 5y agoIndeed, in Spanish we say "lava la ropa" do the laundry. I am pretty sure that is what my brain wants, action object. Once in object-oriented training I was told that In Cantonese the person does not act on objects but the objects act on themselves: "The deck of cards shuffles itself"