(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=39008533

有些人可能会因为难以记住高级 Vim 命令而选择使用无模式 Vim,从而导致对传统编辑器界面感到沮丧。 他们可能会选择像 Micro 这样更有针对性的解决方案,或者修改 Vim 以实现更简单、更有针对性的动作。 其他人可能会利用 novim-mode 或 vscodevim 等插件将 Vim 的各个方面合并到更现代的环境中。 最终,存在各种解决方案来满足编辑和编码实践中的个人偏好和需求。 例如,Nano 提供与终端中的文本编辑类似的功能,而 VSCode 提供与集成开发环境 (IDE) 中的功能相当的功能。 尽管围绕这个无模式 Vim 变体的创建受到批评,但该插件旨在提供 Vim 最重要​​的功能,而不需要使用模式键盘,以满足那些习惯使用更传统和流行编辑器的用户。 本质上,存在一系列满足个人编辑要求的选项,无论它们是否符合传统的文本编辑概念,或与既定标准有很大偏差。

相关文章

原文
Hacker News new | past | comments | ask | show | jobs | submit login
Modeless Vim (github.com/sebastianmuskalla)
312 points by soap- 1 day ago | hide | past | favorite | 354 comments










Conceptually the reasons the author give for this (syntax highlighting and other features of vim outclass other terminal-based editors) make total sense.

That said there's something absolutely defiling about this. It's like installing a V8 in a Tesla, or replacing the pumpkin in pumpkin pie.

I love that it will make VIM more accessible for more people, but I hate how they do it. Kudos to the author.



> It's like installing a V8 in a Tesla, or replacing the pumpkin in pumpkin pie.

Most pumpkin pies are actually made with butternut squash and other similar squashes, not pumpkin.

https://en.wikipedia.org/wiki/Cucurbita_moschata

https://www.thekitchn.com/whats-actually-in-your-canned-pump...



Not sure about where you’re from but where I’m from, you don’t make pumpkin pie from a can. You make it with pumpkin purée. From scratch. Get out of here with your non-pumpkin pumpkin pie propaganda.

Some pumpkin, blended into a paste, some brown sugar, an egg or two, some heavy cream and some cinnamon and crushed cloves and you have your pie filling.



You can make it with homemade butternut squash puree too, and it will taste better because of its sweetness. Give it a try sometime.


That’s a butternut squash pie, not a pumpkin pie. ;)

Try with pumpkin, nutmeg, cinnamon, and cloves… it’s that old timer pumpkin pie taste.



In most places in the world, the word “pumpkin“ refers to squash. A squash pie is also a pumpkin pie.


Yes, and pumpkins are squashes (Cucurbita) but pumpkin originates in New England USA where it refers to the orange squash gourd used to make Halloween carvings and decorations. Being that I'm from the US, this is "pumpkin". Not to downplay squash-based pastries or pies but there's only one pie that I will eat, day or night, no matter what - the beautiful, delicious, pumpkin pie. Plain, with whipped cream, with ice cream, with chocolate drizzle, with caramel.


In Australia it’s known as “butternut pumpkin”. Anyway I always used kabocha squash.


+1 kabocha rules in pie


Apparently coffee cake has no coffee in it so we really can’t believe anything anymore.


Next you are probably going to tell me black forest cake is not made in the black forest any more.


It’s only Black Forest cake if it comes from that region of Germany. Otherwise it’s known as Chocolate Cherry Conifer Cake.


Oh but mine does… the glaze is powdered sugar and espresso.


My life has been a lie. That sounds incredible.


To be fair - coffee cake in the US is cake to have with coffee and doesn’t normally contain any coffee.

In the UK and EU, coffee cake is cake with coffee.

Likewise tea cakes in the US are cakes made with tea and tea cakes in UK and EU are cakes to have with tea. So…

Not a lie, just a Spider-Man meets Spider-Man moment when you learn you can actually make coffee cakes with coffee (or espresso) and you can make tea cakes with tea (I prefer oolong).



pie you have pumpkin with


You owe me a new keyboard and monitor tyvm


Were you drinking hot computer tea when you read that comment?


I’m from the EU and I’ve never had coffee cake with no coffee nor tea cake with no tea. Very fascinating tidbit about the naming, TIL


To confuse matters more, in this part of EU the coffee cake is made with coffee and tea cake is made without tea.


Oyster stout shouldn't have oysters in, but usually does.


The cake is a lie.


This sounds good but not the kind of coffee cake I’m used to


yellow or moist white cake (or marbled cake) with butter crumble brown sugar top and an espresso glaze. The coffee cake of coffee lovers.


American coffee cake doesn't have coffee, but English coffee cake does.


But coffee cake is the cake you have with coffee, not made from it.


well maybe pumpkin pie is a pie you have with pumpkin


Not true. Standard staple in my oarents house was coffee cake made from coffee with walnuts.


Wait until you find out what baby food is really made of.


Wait until you learn about Tunnock’s Tea Cakes.


There's no tea, and they aren't cakes - but there is a whole fresh Tunnock in every one!


I've tried it and my experience is the exact opposite. I have good results with for example "Crown Prince" variety pumpkins, which I find far sweeter and tastier than butternut.


I freely acknowledge that you can make a delicious “pumpkin” pie with butternut squash, but a real sugar pie pumpkin (use Halloween leftovers and their mealy starchy flesh at your peril) remains superior in my opinion. Sweet potato pie, though, can be absolutely delightful with no squash in sight. Just don’t call it pumpkin pie. ;)


if you're looking for a good pumpkin pie alternative while pumpkins are out of season, sweet potato pie is also excellent.


What's fun about this is that I was taught from my mother, and her mother before her, to use Butternut Squash when making "pumpkin pie" from scratch.

This "tradition" of using Butternut Squash instead goes back to the 1930s at least.



Some areas have different ingredients depending on what’s available. Here in the United States, real pumpkin is preferred. You can use any gourd to make a pie but for the true pumpkin pie aficionados like myself, I can tell the difference when someone uses real pumpkin vs butternut squash vs sweet potato vs just creme, eggs, and brown sugar and some flour (I’m looking at you, Wegmans).

In the southeast coast of US, if you make a “pumpkin pie” with squash, you won’t be invited back next year.



Given that my mother, grandmother, and I, were born in the States, I can definitely say that "preferred" isn't as wide spread as you think it is.


For those curious another common major percentage of “pumpkin pie” blends (such as from Libby’s) is Dickinson squash/pumpkin which is a subspecies of Cucurbita Moschata like butternut squash. These can be found as heirloom seeds. https://www.thespruceeats.com/what-are-dickinson-pumpkins-52...

Here in the Willamette Valley of Oregon, we grow a lot of crops for seeds, of which various squashes are some. It’s amusing to see the first time, but squash grown for seed is typically just shredded in the field, with seeds collected and the flesh tossed out over the field. Results in a lot of “wtf are they doing” among those unfamiliar, because it looks exactly like pumpkins were grown just to immediately destroy them.



If you'd left off "not pumpkin", you'd be technically correct. But it's a somewhat nuanced topic.

https://www.snopes.com/fact-check/canned-pumpkin-isnt-actual...

[I'll just add one more note, not mentioned in the article, which is that typical Jack-o'-lantern pumpkins are quite awful for cooking. Much worse than any canned pumpkin. If you want to cook with fresh pumpkin, research the varietals that are known for good texture and flavor. Don't grab a carving pumpkin from the pile.]



> As much of 90 percent of pumpkin sold in the U.S. (and 85 percent worldwide) is a proprietary cultivar known as a Dickinson pumpkin, which are less photogenic than the type of pumpkins commonly used for display purposes.

Ugh, they really are much less aesthetic than a nice plump orange one. This feels similar to the childhood realization that regardless of the name or the box color there's not really much strawberry juice in anything; it's all apple and pear.



In the US, canned pumpkin is 100% pumpkin, and the big name frozen pumpkin pies all list pumpkin, not butternut squash or other imitators.

And then you have sweet potato pie...



In my household for the last 20 years, it is made from pumpkin. First from sweet pumpkins we would pick up every year at the Halloween pumpkin patch that we as a family tradition would take our daughter too. Now it is made from ones grown in our own garden. They are simple to grow. Pick them, roast them, purée them and freeze until needed. We also make a lovely spicy Indian style pumpkin soup from the purée. The pie is quite different from any store purchased pie and well worth it.


In most countries outside the US, squash is called pumpkin.


> In most countries outside the US [and Canada], squash is called pumpkin.


If you actually want to be pedantic, note that I did not say all countries, therefore my original statement was just as correct as your edit.


But butternut squash is pretty similar to pumpkin. They are both winter squash, and the definition of pumpkin is a little fuzzy anyway. This would be more like replacing the pumpkin with apples.


Ah, I always wondered why pumpkin pies are relatively delicious, while pumpkin is gross. I chalked it up to the sugar.

(Chalk and sugar in the same sentence just made me think of Macdonald's milk shakes.)



I've heard this claim various times, but it doesn't really make a lot of sense. Butternut squash has a carb:fiber ratio of about 6:1. Canned pumpkin is more like 3.5:1. Sure, the USDA might be lax on the precise definition of the word "pumpkin", but I don't expect them to go so easy on the nutrition data.

As Wikipedia notes:

>The term [pumpkin] is most commonly applied to round, orange-colored squash varieties, though it does not possess a scientific definition and may be used in reference to many different squashes of varied appearance.

If the article is simply intending to say that it does not usually come from squashes that are orange, oblate and ridged, then that's fair. But I don't think it's mostly butternut squash, and I don't see why manufacturers would try to hide using the most popular variety of squash.



> but I don't expect them to go so easy on the nutrition data

Interestingly, I expected them to go easy on pretty much anything



It’s similar to preferring guitar hero because a real guitar has too many frets and too many chords to learn


I guess it's the end-goal then, though. If your goal is to become a rockstar and play the guitar in a band, GH is probably a very bad route to it. But if it is to "have fun" its perfect.

Same with this vim: if you just need an editor that is recognisable and "not weird" then this modeless vim might be useful; though why not just install nano, pico, gedit, notepad++ or even notepad.exe?



More like learning the clavicord.

“But your fingers aren't touching the strings!”



Seriously, it hurts. It makes sense, but it hurts. If only there were a more gentle path to editor modes. Maybe some simple graphical representation of the modes and commands that could be down in the corner? Like a dynamic vim infographic that clued a user into the most likely commands.


Helix is beginner friendly. It's keybindings make more sense than vim's.


For me, the reason to learn vim is because if you know how to use it it's a really nice editor that's preinstalled on almost any system you shell into. I use VSCode on my home system and occasionally on a remote system, but I'll use neovim when doing a quick edit from the command line and vi when I happen to be o a remote system. In my ideal world, I would just use one editor everywhere, including if I'm hot-seating on a system that is not mine and without internet access: having vi already under my fingers is a nice approximation of great editor + everywhere.


Yeah but it’s a small island.

If you learn Vim you’ll have access to Vi and Vi-like interfaces in lots of other software including terminals, database clients and everything that uses readline.



Curious what kind of interfaces you're thinking about? (Aside from vi, vim, nvim)

From my experience anything with "vi navigation" basically just means using the home row keys for navigation + modes. So I haven't come across many interfaces yet where the verb order differences between helix/vim come into play.



In vimium I use vim navigation for scrolling around, / for search, and a bunch of tab actions that aren't vim accurate but vim inspired.

In mpv I use gg/G to getting to the beginning/end of a file.

Many terminal file managers use vim binds or idioms (such as x for delete, marks, etc).



Overleaf, for example, supports most of Vim’s bindings.


Then the question is readline. Not saying that vi or emacs deserve to win readline, but it’s up to you to describe how Helix mode would differ from vi mode.


i3 window manager leans heavily on vim defaults for navigating windows.


Shells have Vi mode: bash, fish, zsh.


Helix is wonderful. I did make one keybinding change: Switching in and out of Insert mode is CTRL-i so I don't have to wander off to the escape key so often.


If I had a lot more free time, I've been noodling with some designs for a text editor with modes. It would start up by default in the equivalent of vim's insert mode where all the normal CUA keybindings (e.g. ctrl-c for copy) worked. But with many more. Then, if you go to the equivalent of normal mode you can just press X to do the same thing ctrl-X does in insert mode.


>If only there were a more gentle path to editor modes. Maybe some simple graphical representation of the modes and commands that could be down in the corner?

I taught myself vim by setting the vim cheat sheet to be my terminal background, though I greyed it out slightly so it didn't obscure what I was typing. Once you have that there are only a few phrases you really need to know: "+p, "+y, "+d to access the system clipboard, :split and :vsplit, C-w w to switch windows, and g C-g for word/char count.

https://www.glump.net/_media/howto/desktop/vim-graphical-che...



"That said there is something absolutely defining about this."

Not expecting anyone to agree, but this is how I feel when using minimal shells that do not implement vi editing, e.g., set -V or set -o vi. Busybox/toybox is one example. In the aggregate, I actually do more editing on the command line than I do in vi. If the shell is permanently set to emacs-like keys and editing then I am constantly switching back and forth to "vi mode" everytime I edit a text file and return to the shell, i.e., nonstop.



In Jef Raskin’s ‘Humane Interface’, there’s a good justification to why modes are evil, mainly leading to excessive user errors, so it’s not that surprising.


Emacs runs in a terminal. Vim isn't installed everywhere, Vi is. If you're going to install an editor and a config you might as well just install Emacs.


I believe only the BSDs install real vi in the base OS.

Everywhere else, when you type vi, you get vim. Some neophile Linux distros provide neovim instead.

Regardless, vi and vim (and neovim) are the same in basic operations.

It's still functionally correct that "vi is always installed" and no additional action is necessary for basic text editing.



> Vim isn't installed everywhere, Vi is

Doesn't most major distributions alias vi to vim nowadays? I think I've also come across vi being aliased to vim-tiny if I remember correctly.



For those who don't know, there are at least two different V8-powered Teslas.

https://youtu.be/x-6kHjF1U1E?t=402

https://twitter.com/FthePump1/status/1738425546621825468



for a moment there, I was wondering why they'd install a JavaScript engine in a tesla.


Tesla uses Qt and Qt WebEngine uses Chromium, meaning that there is probably in fact a V8 JavaScript engine in any given Tesla.

https://github.com/teslamotors/buildroot/tree/buildroot-2021...



Noice.


I disagree. It makes no more sense than turning a modeless editor into a modal one. Just use the right tool for the job.


> It's like installing a V8 in a Tesla

Maybe putting diesel generator in a Tesla so you can use it even though charging is not your cup of tea.



> I hate how they do it

What exactly do you hate?

The site says:

> > Ctrl+S to save, select text using Shift+←/→/↑/↓, and copy/paste using Ctrl+C/V.

I haven't setup Control-S, but I have very similar bindings: Shift and arrows for selecting, then Alt or Control-Shift for moving the selection around, as shown on https://raw.githubusercontent.com/csdvrx/CuteVim/main/record...

Also, like the author I have a shortcut to change themes (F9) and another to toggle invisible chars (F8), and I try to use the top of the screen as much as possible (I show the offset in hex, the row and column position etc).

I like how vim is modal, but some Windows shortcuts (like Control-C) just make too much sense to given them up on Linux: I have put `stty intr ^X` because using Shift-Control-C to copy from the terminal was way worse.

Having a few chording shortcuts give you the best of both worlds!

BTW, all of the other shortcuts proposed on this site make a lot of sense to me: I do expect Ctrl-F to search, and Ctrl-T to open tabs, I think I will copy a few :)



Back in my day, when we pressed Ctrl+S, the terminal froze, and that's just the way we liked it.

https://unix.stackexchange.com/questions/12107/how-to-unfree...



Ctrl-Q whew


We should concede that /etc/profile ought to disable that with stty by default.


> Back in my day, when we pressed Ctrl+S, the terminal froze, and that's just the way we liked it.

I don't think anyone needs (or even wants) the terminal to freeze on such a common shortcut in 2024.

Personally, I have reclaimed Ctrl S for word delete (usually done by Alt-d)



Super helpful for basically anything in a terminal. Stuff is going to flow by pretty quickly or at least keep bumping the terminal every couple seconds, usually when you _least_ want it to do so. Reading off whatever your program emitted while it's pushing the terminal up every half a second gets really annoying without Ctrl-S. It's probably the most used terminal shortcut after Ctrl-C for me.


That's a fine argument, but not relevant for when you're in an editor -- and modern TUI apps disable XON/XOFF for that reason.


Related: why does the shortcut to delete back a word (^W), close my browser tab?


This still happens to me too often. Especially annoying in web-based editors.


That gets me multiple times a day. What is even worse is ^h opens the history instead of just deleting the last character.


Delete current word, delete current tab. Its related.


That's why I think MacOS is superior: it actually uses the "meta" key for useful stuff. So, Cmd-W would close the tab, and Ctrl-W would probably still delete a word (can't check right now, but it has a lot of 80s-era keyboard shortcuts for text still working)


macOS uses a lot of Emacs bindings. Ctrl-a for beginning of line, ctrl-e for end, etc etc.

And, agreed, macOS' use of shortcuts is fantastic and I wish I could replicate it on Linux.



I use emacs and I respect emacs developers, but it is not originally emacs bindings: http://unix-kb.cat-v.org/


If you use gnome/xfce:

    gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"

    xfconf-query -c xsettings -p /Gtk/KeyThemeName -s Emacs
Try both commands.


Very cool!

I also want to use Command (Super or Hyper?), which really improves keyboard shortcuts. Command + left/right = jump to beginning or end of line, Option + left/right = jump to beginning/end of word. I know you can do the same with Control + Shift, but some apps don't support it. Plus Cmd+c/x/v for copy/cut/paste works fine in terminals, I don't have to remember to "code switch" my shortcut "language". Cmd+Backspace deletes the whole line, etc etc.



I bound WindowsKey-C to run the command "xsel|xsel -b" which copies the active selection to the clipboard. It's a small step in the right direction; it's possible to get paste working as well, but that takes awareness of apps (or reconfiguring all GUI applications to use the same shortcut as the terminal).


I just swap Ctrl and Caps Lock, much better.

setkbmap us -option ctrlL:swapcaps -option compose:rwin

You can place that command at XFCE's startup settings for applications.



You missed the point; Ctrl-C is never going to be "copy" in a terminal, since that shortcut is already in use. Cmd-C can work everywhere, but GUI applications on linux do not default to that.


it also switches focus window, which is makes things even more confusing


> I don't think anyone needs (or even wants) the terminal to freeze on such a common shortcut in 2024.

I find it rather useful to keep important output of programs on the screen when it is impossible (or I forget) to pipe them into a pager.



> I like how vim is modal, but some Windows shortcuts (like Control-C) just make too much sense to given them up on Linux

Ctrl-C does work in the GUI. That said, one thing I like about Linux is being able to highlight text using the mouse and then pasting it by middle-clicking. I don't have to interact with the keyboard at all to copy and paste text that way.



Remapping Ctrl-O denies the ability to switch modes. That’s what turns this from simply an opinionated config to a breaking change.


That's fair, changes should try to preserve existing uses


My usual comment on any thread touching vim, as an answer to all hypothetical comments talking about how vim never clicked :

Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person)

It's the most important key and you should punctuate all your inserts with it. So it'd better not be the key that's the furthest away from your fingers. The reason that's the case is an historical accident.

Don't be a victim. Remap.

P.S : Yes, I know about people using Ctrl+[, or Ctrl+C, I know you got used to it but one gets used to anything, it does not mean it's good. A weird combination isn't great and Ctrl + C has some quirks --> https://vi.stackexchange.com/questions/25764/use-control-c-i...

P.P.S : Yes, I know about `jk` it's clever ok but my mapping is system-wide and now I enjoy Escape being at the right spot for bash, zsh, fish, gdb, firenvim vim modes at no configuration cost.



> Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person)

I think this is great advice for EVERYONE, vim user or not. Someone else made this suggestion on HN some 8 years ago and I haven't looked back since.

CapsLock is essentially useless for modern computing needs, but having a No/Cancel/Quit/Esc button immediately under your left pinky is fantastic. Your brain will get used to it in a day or so, give it a try!



Best use for capslock in my book is tap for escape, hold for ctrl.


That sounds awesome! I'm going to look into that.


Where do you map it that way?


As my sibling commenter said, use Karabiner Elements if you are on macos. Though it's not an out-of-the-box thing.

Add this config to ~/.config/karabiner/assets/complex_modifications/custom-capslock.json

    {
      "title": "Change caps_lock to Esc and Control",
      "rules": [
        {
          "description": "Post Esc if Caps is tapped, Control if held.",
          "manipulators": [
            {
              "type": "basic",
              "from": {
                "key_code": "left_control",
                "modifiers": {
                  "optional": [
                    "any"
                  ]
                }
              },
              "to": [
                {
                  "key_code": "left_control",
                  "lazy": true
                }
              ],
              "to_if_alone": [
                {
                  "key_code": "escape"
                }
              ]
            }
          ]
        }
      ]
    }
and then in the GUI enable it in the Complex Modifications tab. Last you need to map "capslock" to "left_control" in the Simple Modifications tab.


Ooh! Can I do this with "z" and "/" (letter if tapped, control if held)?


My GUESS is that it would be something like this:

    {
      "title": "Hold z or / for control",
      "rules": [
        {
          "description": "Hold z for control",
          "manipulators": [
            {
              "type": "basic",
              "from": {
                "key_code": "z",
                "modifiers": {
                  "optional": [
                    "any"
                  ]
                }
              },
              "to_if_alone": [
                {
                  "key_code": "left_control"
                }
              ]
            }
          ]
        },
        {
          "description": "Hold / for control",
          "manipulators": [
            {
              "type": "basic",
              "from": {
                "key_code": "/",
                "modifiers": {
                  "optional": [
                    "any"
                  ]
                }
              },
              "to_if_alone": [
                {
                  "key_code": "right_control"
                }
              ]
            }
          ]
        }
      ]
    }


Yep! You can do whatever you want with complex modifications. The only tricky part is figuring it out. It shouldn't be TOO different than the above if you replace the appropriate values.


as said here: https://superuser.com/questions/1716264/xmodmap-holding-a-ke... using this https://github.com/alols/xcape :

  $ setxkbmap -option caps:ctrl_modifier
  $ xcape  -e 'Caps_Lock=Escape'
if that need be run multiple times (i.e. in bashrc), add a guard:

  pgrep xcape >/dev/null || (
   setxkbmap -option caps:ctrl_modifier
   xcape  -e 'Caps_Lock=Escape'
  )


I use this executable for Windows: https://github.com/ililim/dual-key-remap


Karabiner-Elements will do this for you on Mac.

I consider it indispensable.



Yes, CapsLock is useless, and I've been remapping it to Ctrl since forever, which serves me a lot more than Esc.


It can be both if you care to. You don't have to choose


I've done Esc-on-single-press-Ctrl-on-hold once, but some games don't recognize the Esc press. Couldn't get to a menu anymore :P

Currently just have Esc on the CapsLock.



If I remap CapsLock to Escape, then how will I enable cruise control for awesome mode?

But seriously, I have hitting escape muscle memory engrained, I cannot remap it to any key because I won't ever think to hit capslock even if it's ergonomically "better"



I thought that, remapped it, and it turned out to be incredibly easy to swap over. I think it's because it's so much nicer to use.


My point is that it's NOT nicer to use for me.

I just instinctively did it to see my motion and it's an awkward feeling for me to move my left pinky over to the capslock key, definitely something I have to be mindful of doing to make happen and probably will take a long time for me to get used to.

Meanwhile, I actually extend my ring finger up and barely touch the escape and move it back down, all of that is very comfortable for me and I can do it without looking 100% of the time and never miss it.



> Ctrl+C

...and to try and avoid this being perpetuated as it always seems to: ctrl-c is NOT the identical to escape. Notably is doesn't trigger InsertLeave which means a handful of plugins won't trigger.

I think your advice can be summed up to: Remap esc to something more convenient. My capslock key is tap for escape and hold for ctrl. I use jk for escaping insert mode because why would I want to be a "victim" who has to stretch their pinky even one key when my fingers are always going to rest on JK? ;)



> Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person)

I guess I'm not a normal person then? Never bothered doing the remapping and I've been an enthusiastic Vim user for a decade.



Smacking the escape key constantly is probably my favorite part of using Vim. It has me smacking escape all the time to see what it does in other apps. I love when esc is just mapped to a "stop doing that" or "go back".

Also doing embedded stuff, I find the caps lock key nice for when typing out a few defines or macros.



Haha I’d hate to know the number of form modals I’ve closed out of after instinctively hitting escape.


I don't know you but that is likely.

Most people are not believers and when they find something inconvenient they abandon it. Most people do what most people are doing :-) That's not the case for me. I am a believer, I use Firefox, Signal and vim, not Chrome, WhatsApp or VsCode. And I like it that way. The problem with being a believer is that you tend to downplay issues and that can bite you sometimes. I know because I have been been bothered by Escape being too far away for one whole year and use the weird combo instead. Surely there was a good reason for things being that way but I finally asked it turned out there was not.

Maybe you are the rare person that has very long fingers or whatnot and it's not inconvenient for you but you most likely are a believer :)



FWIW, my “jk” mapping is also global, as is my C-[ mapping. Karabiner FTW. In all seriousness I haven’t found a way to manage a “jk” mapping that so correctly and quickly handles all cases of input in anything else, on any platform. (Except of course built into the keyboard) Autohotkey can kinda sorta do it, but it takes a lot more code for an inferior result sadly.


“Doesn’t mean it’s good” doesn’t mean it’s a problem either. Also, people prone to remapping already have their Ctrl there.


Yeah I use Ctrl far more often than Esc as I'm usually navigating code and reading it vs writing it, so Caps Lock -> Ctrl is more valuable.

Additionally, I use Ctrl outside of vim very frequently as I keep my terminal key bindings native, which means all of the command line control patterns use Ctrl (jump to front, jump to back, cut (forwards/backwards), move by word, reverse search, etc etc)

I'm still of the opinion that Ctrl+[ like the OP said would be mentioned is the best because (1) it's native and (2) it uses both hands so it's almost as fast as hitting a single key and requires no hand contortion.

- 14 year exclusive vim user



Por que no los dos? I map caps lock to escape on tap, ctrl on hold.


… and set "Both Shift Keys" to toggle caps lock.


Life can be beautiful we don't have to suffer because it's already there.

Remapping takes less than 5 seconds in MacOs and Linux. 2 minutes in Windows. And you only have to set it up once.

Also my left pinkie never misses CapsLock and I don't even have to think about it. Can't say that's the case for Ctrl+[ which I have used extensively for one year. I am really happy I switched.



What do you do when you need Ctrl in non-vim contexts?


I just press Ctrl ?

But frankly I don't use Ctrl that much. Ctrl + L/K in Firefox (I use vimium but I prefer the native bar) And I have Ctrl + J/K to switch terminal tabs In vim I only rarely use Ctrl + I/O



Are you often working within the command line? I don't use vim bindings elsewhere so I use these a lot: "Edit a command line" section on https://support.apple.com/en-gb/guide/terminal/trmlshtcts/ma...


The caps lock key is definitely using prime real estate on a keyboard for something that doesn't get used often.

I have taken to remapping it to a function key, moving caps lock to function+shift. Function+tab is mapped to escape, a combination I can easily press with my pinky alone.

This allows me to map a lot of the keys that would require moving my hand to function+[alphanumeric key], function+i is insert, function+u is page up, function+j is page down, function+r is home, function+f is end, and other such combinations.

I use a keyboard that supports QMK, so all of this customization is on the keyboard, but this could probably be done with software running on the computer, like AutoHotKey on Windows.



On a Mac you can do this rebinding entirely natively within the system keyboard settings.


Can I suggest going one further and have esc mapped to tap, ctrl to hold. You can also map double escape to :noh in vim, which allows you to quickly remove highlighting.


But caps lock is remapped to control already! :)


You can have both. Esc on tap, ctrl on hold.


This is the proper functioning for this key


On a Mac?


WHAT? HOW AM I GONNA TYPE MY SENTENCES THEN!?


> WHAT? HOW AM I GONNA TYPE MY SENTENCES THEN!? goto visual mode , select region to capitalize , shift - U


Seems maybe author did not know that this is already built into vim?:

"easy vim", aka evim, or "vim -y". see "man vim"

That said, if modeless editor you are looking for... then vim is not the editor you're looking for. It goes against what vim is, and hamstrings it. Learning vim is a journey, and once comfort sets in, you will understand why, why vim.



Good to know.

Of course, I did have to google how to quit easy vim.



> I did have to google how to quit easy vim.

For those who know how to quit vim, but want to experience "how do I quit" again, try running `:term`.



The real magic is opening :term, close all your splits, forget that you're still in term, try to open vim again, and then being momentarily confused why you find that all the keybinds and broken. This happens to me about once a month.


for any one wondering

cntrl-o --> to get to normal vim mode

then exit as usual



It's apparently also possible to do Ctrl-q to quit directly (it runs :confirm qall).


> It goes against what vim is, and hamstrings it

Not the first, not the last hacky project. Saying that it goes against what it is makes me think of JS V8 being used outside of browser.

Perhaps there are good reasons for not having modeless vim (or server side js for that matter), but the industry overwhelmingly accepts good enough solutions, with good enough results.

Vim go brrrrrr, I guess.



As an old vim graybeard, more power to you.

I'd recommend checking out `vim -y` as well. (And once you try _that_, you'll likely have a question, the answer to which is Ctrl-l.)

To others on this thread decrying this as heresy: leave 'em be. Let everyone use whatever editor flows works for them.

Programming is hard enough without having to conform to other people's beliefs of how _you_ ought to use your own editor!



IBM CUA

I’ve always wondered how different Unix/Linux would be today if decades ago a Common User Access (standardized menu system like FILE | EDIT | etc) had been defined for TUI apps (like how it was for Windows & Mac OS).

Imagine VI & EMacs having the same key bindings due to standards.

https://sqlite.org/hctree/doc/hctree/doc/hctree/index.html#s...



vi and emacs are prehistoric. Folks now are ok with / and \ and maybe some can deal with : as a file separator.

But in the precambrian era you needed to know about ^ to edit a specific version of a file, because diffs were tracked.

They're both wonderful and amazing and can handle anything, because they had to handle everything when filesystems were like a brand new invention and nobody really knew what was good or bad, so they threw everything in.

Tough to get standards before standards exist.



So very much this. Around the end of the 1980s / start of the 1990s, all the big DOS apps switched their weird proprietary UIs out for CUA ones. Sometimes with an option to go back, but not often. Sometimes with some of the old UI as well, but mostly, big-bang.

And everything was better, the users adjusted, nobody ever looked back and we were all better off.

Sadly the memo never reached the Unix world, and those terrible 1970s are now enshrined as holy writ.



Emacs has a mode called cua-mode with keybindings thats more simillar to ones from other modern gui programms like browser.


It's a tiny tweak that gives something like 1% of the functionality.

The real, useful, working CUA mode for Emacs is here:

https://ergoemacs.github.io/



Power of Vi is that its keybindings are way more ergonomical compared to IBM CUA. If you're a touch typist.

It doesn't make sense to change Vi/Vim/NeoVim keybindings because they're so convenient, composable and easy to remember.



That is only the case if you think you have to press Ctrl using your pinky. You can use the side if your palm instead. Then CUA suddenly becomes very ergonomic. Try it. I've done this for over 15 years now across a plethora of different keyboards and also survived several years of Emacs unharmed thanks to it.


I used to do approximately this, from maybe the mid-90s to 2015-ish, but finally that keyboard died (RIP dear friend) and I find that it doesn't work properly on any keyboard I've found since.

Not quite the side of my palm, but the joint where my pinky meets my palm. My hands are relatively large, dunno if that's relevant.

I should put more work into buying a keyboard that it does work on, I think using my finger for Ctrl might be starting to cause RSIs in my middle-aged hands.

I guess I'll also add that for me it's a bigger deal when gaming than when using CUA. That Ctrl button is the one true place to put crouch, dangit.



How do you do that without hitting Shift? It seems needlessly finicky compared to just properly holding the key down with my pinky. I'd say the best way to avoid RSI while using key combinations is to follow proper procedure and hit the opposite modifier, e.g. Left Control + S (Right Control for Qwerty typists).


I just tried this on my laptop and it is the most uncomfortable thing I've done on a keyboard.


I don't think this covers the main reason I only use vim occasionally: it is the only reasonable editor available over ssh by default on all VMs deployed in your typical org. Over there it usually has default settings, and it's not trivial to change configs or install other editors.

Worthy attempt, looks cool, but I'm still stuck with having to learn the basics of moving a cursor around reasonably :(



You can learn the basics in under 15 minutes.


I agree with the aurhor of the library.

> Q: Why don't you just learn the vim commands?

> A: I did, but if you don't use vim regularly, you keep forgetting them.

The basics are only useful in vim, and editors that you force into vim mode. Other places one types text into which use the same conventions absent in vim: browser input fields, the url bar, email, office software, random input fields in games (I've seen single file libraries that obey the same conventions of moving across words that you get in office), publishing software, chat clients... Vim is the only outsider, and because I only need it rarely, I forget things and I accidentally use the shortcuts from other software which sometimes break things.

I know enough vim, but I keep using conventions from other software out of habit, and shortcuts do other things. Vim is great editor, but a horrible thing to use by default simply because it was made before text editing ux got standardized.



You’d be surprised how much software has VIM bindings built-in or a plugin to add them. This includes browsers, email and office software.

More importantly for me personally, is that VIM is a lot more ergonomic than the “standard” Windows-style text-editing ux you prefer. It played a crucial role in helping me (mostly) recover from severe repetitive stress injuries. Many, many others are in the same boat.

I wish I’d started using it in earnest years sooner. IMO, it’s worth learning even if you never have wrist problems. I write, and especially edit, blog posts faster now with it than I could prior to injury when I could type faster.



As a vimer, this is absolutely true. Learning is repetition, not just reading. And we don’t have time to learn something we rarely use.

For the same reason I can never even think of writing in ahk, awk, bash, scss and other arcane syntaxes without examples and snippets. Because the usage is occasional.

And I definitely hit Esc and lost my input too many times. Of course the apps that don’t ask for Esc confirmation are to blame, but they exist.



And you can forget them in the next 15 minutes. Been there, done that.

As the article says, if you don't use it regularly you'll never learn it by heart, and Vi doesn't have any affordances that will remind you of what you learned by recognition instead of recall.



It's unforgiving, but that's also a bit refreshing. The feeling of accomplishment after a coding session in vim cannot be replicated in other editors.


This is precisely my use case for using vim exclusively, and why I force myself to operate with a minimal config.


You can make it better and remap CapsLock to be Escape. Now you are not constrained to use vim but can actually enjoy using it (and now you can try your fav shell's vim mode and become a command line ninja, imagine going up and down your command history with j/k and searching with your command history with just /)


Thankfully you can usually find nano installed, which is an order of magnitude superior to vi(m). If I'm in a shell I want an editor to get in, edit a couple of lines, and get out, which nano excels at.


> The config files in this repository turn vim into a modeless editor. Instead of remembering cryptic commands, you can use standard key binds, like Ctrl+S to save, select text using Shift+←/→/↑/↓, and copy/paste using Ctrl+C/V.

> This configuration is not meant for the aficionado who prefers vim over graphical editors. This is meant for people who normally use GUI editors (like VSCode), but sometimes need an editor that can run in a terminal.

I think it's unrealistic to expect users who only occasionally use vim to edit the odd config file in the terminal to fiddle with a custom vim setup.

If you're really looking for a good editor that behaves like GUI editors I really recommend micro [1]. It has mouse support by default, syntax highlighting for many languages out of the box, most keybinds are the same as in GUI editors and copy/paste works like expected.

[1] https://github.com/zyedidia/micro



I attempted this within a few days of first being exposed to vi - 35 years ago.

But since I was logging into different machines all the time I soon decided it was better to just use vi the way it came out of the box, modes and all. That philosophy has served me well over the years.



I had a similar realization early after first picking up vim in college: customization of any tool eventually hits a point of diminishing returns beyond which further alterations reduce your ability to use the tool in its default state. It's an insight I've found applies to almost any tool... From software to hardware and beyond.

Master the default behavior of a tool, and then improve your effectiveness with customization, but not so much customization that you can no longer use the tool effectively in its unmodified state. Sometimes you have to use other people's tools, and it's important to still work effectively when you do.



I agree with this very much! I learnt it the hard way: my experience with many powerful tools, Vim included, was to learn the basics first, customize it to the point where you can't recognize it anymore, and then finally strip it down to the basics again, keeping only the configuration that doesn't prevent me from using the the raw features.

I used to manage complex "dotfiles" and scripts to configure a new computer, etc. I still technically do, but they are much more simple now. I just don't want to spend my time on configuring the stuff anymore, and appreciate the out-of-the-box experience much more. This by itself became a criterion when choosing new tools, frameworks, etc.



I used to think like that, but 10 years ago I decided to create a git-repo for my .emacs.d and started configuring beyond the most trivial settings (and including all dependencies in the repo too). Diminishing returns? Not sure how to measure. Editor configuration was never anything I did because I thought it would somehow save time, as some seem to imply, but rather just about removing sharp edges and making the experience of editing files nicer. With everything a quick git clone away it is rare that I have to work without my configuration.


I totally agree, but we should concede that the defaults need to accommodate the next billion users instead. I propose that a distribution ought to have the right to:

- Easy-mode as sensible-editor

- runtime mswin.vim, set nocompatible, etc as the skel vimrc

These are easier to change than driving new users to Google “how to exit vi”.

But remapping Ctrl-O, like this post, is a breaking change.



Speaking about mswin.vim which does mostly what this does: what's the point of this project.


Do you remember which plugin/project you used at the time? The one being linked looks pretty recent [1]. Are there any other implementations?

[1]: https://github.com/SebastianMuskalla/ModelessVim/blob/main/L...



> But since I was logging into different machines all the time

We now have actually portable executables (multiplatform, multios) that contain their own config file: you can just scp 1 binary and be done with it.



Do you have a link to this? It is not always possible, arcane non x86 arches, low bandwidth connections, but time is the big thing. A binary upload just to change some lines in a machine on the other side of the world. I am lazy.


The superset is 243MB from https://justine.lol/cosmo3/ but it might be more convenient to be lazy and run sshfs rather than modify the far end.


for vim aarch64 and x86-64 : https://github.com/csdvrx/CuteVim

just embed your own vimrc with zip following the instructions

for others, see https://cosmo.zip/pub/cosmos/bin/



As the author states, the purpose of this is for users who work in other editors. But if that’s the case, when would they need this? Assuming they mean when a user is logged into another device where they only have terminal access. But in that case, this wouldn’t be installed by default-one reason to learn vim or emacs. So is the use case that one would just install this on the remote box and that their permissions would allow for this? If they have the permissions wouldn’t they just be able to connect via their existing IDE and skip the terminal altogether?


I started using this because my favorite editor (micro) has very poor syntax highlighting for ruby. It's a very specific use case but it's quite nice and I'm considering switching to modeless vim


You claim that you forget Vim keybindings, but then you have this on your about page:

   email: echo soaper.:.disroot.:.org | sed 's/.:./@/; s/.:././'


We all have limited capacity to learn stuff. If I didn't already know Vim, there's very little chance I'd have the motivation/time/energy to learn it for the first time now.


What’s that have to do with Vim keybindings in particular?


I was just saying that if one can remember sed syntax, Vim's should be easy to follow.


You don't need to memorize the syntax to have a script.


No joke: I wouldn’t have a programming career if remembering syntax were a requirement.


The author might just have copied that sed expression form someone else.

Or looked it up once and probably now forgotten it.

Also regex expressions are not vi expresions and have wider applications so author might use them regularly.

So nothing here suggest that the author can remember vi.



Why not just use an editor that’s really good at it then? Given you don’t prioritize portability.


This is just a vim config. On shared systems it is very common to have permission to edit your home directory but not to install additional software (and frowned upon to install software into your homedir even though it is possible).


The main reason I don't use IDEs is because I always find sshfs to be annoyingly slow, and it is often convenient for me to edit code on a VPS.

So I am definitely going to try this.



I think it's funny how much emotional energy gets invested into any (neo)vim posts. But the energy is mostly people that never learned vim and feel super insecure about it.

I'm not going to make the same mistake of judging this. If you are someone who has always hated vim and never want to touch it, go for it, this might make your day easier on some machine if you can load this repo really quick (although as others have noted you would need to ftp the repo onto a machine over ssh to make this work).

As someone who is a neovim enjoyer, you are allowed to not like (neo)vim, I don't want to hear you bitch about the editor you don't want to use. If you're a vim user who has this bad habit of shaming people for their editor choice, STOP! It gives us all a bad name whenever you judge people just because they don't enjoy the vim life, just like emacs it's closer to a lifestyle than a tool and if people don't want to invest the time they have the right to make that choice.

The world is no longer dominated by vim and it really has become an optional skill for new programmers.



Agreed. I prefer vim as my $EDITOR, but I don't use it for programming. There I prefer JetBrains IDEs mostly. When I'm editing something in a POSIX terminal, vi is guaranteed to be available and is powerful. Knowing how to use vi is useful because it's required by POSIX and thus available on any system you SSH into. That means default settings & no plugins, and maybe not even vim.


>learn vim

After starting the (neo)vim tutorial, all I could think about was if people who "learned" vim never learned how to edit text in a normal text/code editor.

And I don't mean this in an inflammatory way. I mean:

hjkl = Arrow keys

b = Ctrl + Left

w = Ctrl + Right

df = Ctrl + Delete

$d = Shift + End, Delete

dd = Home, Shift + End, Delete

2 = just press the keyboard command twice??

ddp = Alt + Down

ddkP = Alt + Up

The more I read the tutorial the more I felt like... do you not have arrow keys? I mean this literally. Is your keyboard just esc to f12 and there are no arrows or the numpad and it just ends there?

I do understand some good points of vim, like how explicit it is. There are many code editors/IDEs out there and sometimes how they treat Ctrl+Left/Right has subtle differences, e.g. ending the "word" in "-" or "_" or stopping before or after spaces. But most of this stuff is (or at least should be) configurable. But that's about it.

I mean how do you even use the numbers? Who looks at code and says "no, this should be exactly 8 lines below this one." I just Alt + Down until it's right. I'd spend more time trying to write the command right than I'd spend just pressing the keys multiple times.



>I mean how do you even use the numbers? Who looks at code and says "no, this should be exactly 8 lines below this one." I just Alt + Down until it's right. I'd spend more time trying to write the command right than I'd spend just pressing the keys multiple times.

With relative line numbers it's really easy actually. Typing dd7jp takes less effort than pressing alt + down multiple times and I have hard time believing you'd be make this argument if you were comfortable with modal editing.

In fact, none of the alternatives you listed seem attractive if you're accustomed to modal editing. How is Home, Shift + End, Delete a good alternative to dd? So much movement to do a simple operation.

I would highly recommend you giving it an honest try and if it doesn't work, you can always go back to editing the traditional way but once it clicks, "the old" way feels super awkward.



Modeless Vim. I guess that’s a bit like a peanut butter sandwich with no peanut butter. But if that’s what you want, more power to you.


I struggle to think what person, whom doesn't interact with nearly frequently enough, would pull down this to repo just for when they may/might interact with vim


From the README: > This is meant for people who normally use GUI editors (like VSCode), but sometimes need an editor that can run in a terminal.

There's always emacs -nw



I expected to somewhat lightly/jokingly make fun of this, but after looking at the README the reasoning makes complete sense to me and it seems like just a straightforwardly good project. This is not about saying what Vim "should" be, the author is setting up a quick hack to make a ubiquitous piece of software usable for them. Totally reasonable and it's great that Vim is flexible enough to make this work.

It's not about building an ideal piece of software, Vim's model of syntax highlighting is probably not the ideal model for a piece of software, ideally you'd use per-language highlighters that are hosted separately. But those highlighters aren't installed by default, and Vim is. So yeah, use the tool that exists and make it usable. Yes, you could install a Vim alternative, but this is not about making an editor to live in or building a perfect system.

So I think this is great, I don't think it defeats the purpose of Vim at all. I say this as someone who set up Emacs to use Vim keybindings and who thinks the modal editing and composition combined with macros within Vim is basically the biggest selling point of the editor. It doesn't matter what Vim "should" be, this is an easy way to get a ubiquitous text editor to be more usable. Not perfect but a one line installation on almost any Linux box with Internet access, so it solves a real problem with relatively little downside in a quick and easy way -- real hacking at its finest.

It might be useful to compare and contrast this to Vim's easy mode (vim -y), but this project is also 2 years old and I don't know what the state of easy mode was back then, and that kind of comparison might be overkill anyway. I like modal editing, so I'm not as familiar with easy mode so I'm not sure what the comparison would be. I know at some point it started defaulting to a graphical session because quitting out of easy mode in the terminal was giving people trouble. But possibly something to look into, maybe, depending on the system you're using if you need to use Vim but can't customize it.



I can only imagine the kind of fascinating, or maybe frightening list of perceived requirements someone might need from their editor/ide that boils down to their installing this.


Here's a TUI / terminal editor I'd like: VSCode clone. Reads the same config file JSON formats from the same locations, loads and renders the same color schemes, runs the same Extensions Host, exposes the same API to extensions (with some things like WebView, CustomEditor and such throwing NotSupported obviously), keeps up with changes in all those formats.

Major visual difference would be that whatever the editor font settings dictate, would apply to all the UX not just the text-editor tabs. But that, who would even mind.

The extensions compat would have to be NodeJS-based I guess, but the rest wouldn't have to be written in JS/TS I suppose..

Plenty of us are "happily Stockholmed" by the overall DX of VSCode but were there a Electron-less but otherwise 99+%-compat-and-keeping-up-with-vsc rendition (TUI or native GUI), we'd jump on it nonetheless.



It's interesting that you refer to Stockholm syndrome about vscode in a thread about vim.

Me, I first wrote programs in AMOS Basic, which was certainly not CUA either (I remember shift-backspace erased a whole line, which could be really frustrating). I've done enough learning of tiresome nowhere-else UIs... back when I played Nethack, I would of course insert a big S anytime I tried to save in another program for a while. Nethack was at least fun enough to make it worth it.

VSCode is fast for stuff I do in editors which is slow elsewhere (thanks in no small part to Mr. Gallant!) and better at doing anything an IDE used to do, than most IDEs. Does vim support full-featured language servers/tree-sitters these days?



Vim has pretty good support of the lsps and tree sitters that code does (at least for the languages I’ve used), I actually have a mirrored configuration between the two to simplify when I want to jump from one to the other. :)


Emacs has Evil Mode for simulating a modeful editor with vi-style keybinding. Vim now has an extension to do the opposite thing. It would be extra amusing if it supports Emacs-style keybindings (but it doesn't).


See also: https://github.com/tombh/novim-mode (Plugin to make Vim behave more like a 'normal' editor)


I relate with OP about the difficulty to memorize advanced commands from vim. Nevertheless, I cannot go back to a modeless editor and found a happy middleground using VSCode with the vim extension. It's not hardcore vim for sure but I feel that I get the best of both worlds.


Is Micro[0] not a better, more purpose-fit solution to these issues? (Syntax highlighting quality, etc)

Prev discussed: https://news.ycombinator.com/item?id=37171294

[0]: https://micro-editor.github.io/



I tried to create something equivalent to this for a long time. I’m used to normal text editing controls, so there’s no reason for me to learn Vim’s controls. But Neovim’s syntax highlighting and other features are best in class. (I was using Mac, and so wanted to use command instead of control, which requires cooperation from your terminal emulator, adding another layer of complexity.) I got extremely close; but there were constantly little things missing that I expect from native text fields.

I gave up and switched to Sublime Text, and haven’t looked back. The advantage of an “in-terminal” editor is really just not having to break flow to edit a text file, and Sublime is so fast and simple that it works great for editing files outside of a project. Even over SSH (with RemoteSubl) or for writing git commit messages. I can share config details if people are interested.



Micro is probably better at this point for such purpose.

However I also have some customizations myself to use some kind of modeless commands to quickly select or move around, but I still model things around basic vim syntax and its fantastic move keys which keep me in the home all the time (e.g. Using alt+ghjk from insert, I move around, adding shit I select, without having to switch to move or visual mode)



I was using micro. I still love it, but the syntax highlighting for ruby is very messed up


One thing I sorely miss with vim (and which sold me to vscode - yes, I know) is editing in multiple places at once (not sure about the correct term). You select some text, press Ctrl+d to select another one, if you want to skip one Ctrl+k d, then just edit in multiple places at once. Simple and sooo useful, because you actually see each selection before you edit it, and you can select them one by one (or skip, or go back). Alternatives with vim that I found were not quite as helpful, but I'd love to learn I missed something.


vscodevim is a vim plugin for VSCode.


This is blasphemy of the highest order. Modeless Vim is akin to rewriting the universe's source code – an audacious act that sends ripples through the cosmic keystrokes, disrupting the sublime balance of modal existence!


I made a plugin to do this too! https://github.com/tombh/novim-mode

I'd never heard of OP's, I'm sure we can work together to share ideas.



What's wrong with mswin.vim that's shipped with every vim and neovim that you need to reinvent the wheel?


From the README:

> Vim itself already has support for something similar in its optional mswin.vim config file. However it still assumes the necessity of Normal Mode and such heritage as SHIFT+INSERT-style combinations. This plugin however, attempts to avoid Normal Mode unless absolutely necessary, say for interacting with the NERDTree buffer, wherein Insert Mode has no purpose.



That’s a whole lot of code to not have to learn 10 keystrokes.


Unless of course the modal editor everyone is talking about has its most important key, i.e. the mode changing key, the furthest away possible from your fingers because of an historical accident and none of its users are talking about it and are smug about how easy it is so easy to learn a bunch of commands instead of mentioning the issue


You must be kidding. This thread is full of comments about remapping ESC to Caps Lock and other amenities like that.


My top level comment started the thread where most of them are


Is this so you can look cool and say you "use vim btw" while not getting any of the benefits of using vim?


Even the church of emacs have never seen desecration like this.


Wow. This appears to be made for exactly me.

I've half-learned vim and like the idea of it, but frankly I also use so many other "regular" programs that at times I wish I never learned vim.

I'm really hoping this is more-or-less what I think it is.



Ctrl+Shift+←/→/ doesn't work, Shift+←/→/ at the end of line doesn't work, no quick access to console, so I will continue to use mcedit from mc instead.


As someone who used mcedit for ~20 years now and vim for ~1 year I still feel sometimes I'm faster in mc+mcedit for both code edit and navigation. It's slowly moving towards vim(neovim actually) with the whole copilot autocomplete stuff that when used properly can speed things up a lot.


emacs has CUA available and another comment mentioned there's an "easyvim". My point being that those editors already support those features.


As both an avid vim and emacs user, and a lover of both:

This is heresy!!!!!!!!!!



I could get behind a "nanoVim" config that was vim but with nano bindings, that could drop in Linux distros in place of nano, and would let me flip back to full vim when I get dropped into it to edit a crontab or the like.


This reading this for me is like watching someone order eggs sunny-side up but then they scope out the yokes and toss them; eating only the egg whites.

Similes and feels aside, I wonder which situations using vim in this way comes up that you wouldn't just use your preferred editor for. I know you can set an editor for things like git, but couldn't you use a GUI editor?



Happens often when one needs to ssh into a remote server and edit some files, sometimes with tmux to boot.


Why not use vscodes ssh plugin? Feels like that is what you actually want.


> Instead of remembering cryptic commands

I use vim and nothing about its commands are "cryptic" to me. You want to "go to definition"? You press "gd" as in "(g)o to (d)efinition". What's cryptic about this?



Exactly. The whole reason I use vim is because it's like a conversation. If you want to talk about cryptic shortcuts, look at IntelliJ. Why should Ctrl+B be Go to Declaration?


Are you serious? That's incredibly cryptic. The fact that you learned it doesn't make it intuitive for others.


gd isn't a native vim command though :P This tool is intended for people who never use vim more than a few times a month or a year


Not sure why you say it's not native... Sure it's made to work along with a ctag file but it's totally native (ie no plugin) if point vim to one, ctag is only crafting the file.


> This configuration is not meant for the aficionado who prefers vim over graphical editors. This is meant for people who normally use GUI editors (like VSCode), but sometimes need an editor that can run in a terminal.

So it probably not for many people here. But I like it although I use vim as IDE when doing remote development.



I guess now I know how experienced emacs users feel about me always using evil mode.


Why not just use nano where all the common operations are labeled clearly at the bottom of the screen?


The author answers that in the linked thing, the short of it is for the vim features that nano doesn't have.


I wonder which sort of features they could have in mind, if learning the basic modes is too hard for the intended user of the plugin.


They mention that as well - syntax highlighting is one example.


nano of course has syntax highlighting, so I’m curious where it falls short.


Does it have syntax highlighting for the same amount of languages as vim does, out of the box?

I just installed nano-7.2-1 and opened a HTML file with `nano test.html` and it opened without syntax highlight, I can see the point in authors endeavor if syntax highlighting out of the box is what they're looking for.



I mean vim does the exact same thing; you have to turn on syntax highlighting…




I feel like if yiu want a fully featured IDE with language highlighting, debugging breakpoints, and code completion, but at the same time you want more ergonomic user interface, you should just use VSCode instead of doing everything in the terminal


As the author states, this is for people who do most things in a different (modal) editor and just need a terminal editor on occasion.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



Search:
联系我们 contact @ memedata.com