[HN Gopher] Modeless Vim
___________________________________________________________________
Modeless Vim
Author : soap-
Score : 309 points
Date : 2024-01-16 02:05 UTC (20 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| colordrops wrote:
| take that emacs
| thrill wrote:
| M-x zone
| segfaultbuserr wrote:
| It's evil-mode time.
| swader999 wrote:
| Blasphemouse.
| mtillman wrote:
| 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?
| soap- wrote:
| 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
| mtillman wrote:
| Why not just use an editor that's really good at it then?
| Given you don't prioritize portability.
| behnamoh wrote:
| You claim that you forget Vim keybindings, but then you have
| this on your about page: email: echo
| soaper.:.disroot.:.org | sed 's/.:./@/; s/.:././'
| GavinMcG wrote:
| What's that have to do with Vim keybindings in particular?
| behnamoh wrote:
| I was just saying that if one can remember sed syntax,
| Vim's should be easy to follow.
| xboxnolifes wrote:
| You don't need to memorize the syntax to have a script.
| wharvle wrote:
| No joke: I wouldn't have a programming career if
| remembering syntax were a requirement.
| pasc1878 wrote:
| 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.
| nerdponx wrote:
| 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.
| pavon wrote:
| 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).
| ilaksh wrote:
| 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.
| hresvelgr wrote:
| Why not just use nano where all the common operations are labeled
| clearly at the bottom of the screen?
| pvg wrote:
| The author answers that in the linked thing, the short of it is
| for the vim features that nano doesn't have.
| j2kun wrote:
| 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.
| pvg wrote:
| They mention that as well - syntax highlighting is one
| example.
| saagarjha wrote:
| nano of course has syntax highlighting, so I'm curious
| where it falls short.
| diggan wrote:
| 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.
| saagarjha wrote:
| I mean vim does the exact same thing; you have to turn on
| syntax highlighting...
| j2kun wrote:
| For reference:
| https://www.tuxarena.com/static/tut_nano_syntax.php
| shortrounddev2 wrote:
| 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
| wanderingstan wrote:
| 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.
| pvg wrote:
| After years of vi users trying to turn every perfectly working
| program into a worse version of vi, it's heartening to see we're
| taking the fight for sanity and justice back to their territory.
| nextlevelwizard wrote:
| Just fact that ones you learn vim motions it is hard to let go
| since they are so powerful
| pvg wrote:
| Well, reasonable people can have different, even more
| reasonable explanations for that 'fact'!
|
| https://news.ycombinator.com/item?id=25099049
| nextlevelwizard wrote:
| Tell me you have never... eh, you know the meme by now.
|
| But I see no explanation of any kind, just some rand-o not
| liking vim - obviously never having internalised the
| motions.
| agubelu wrote:
| Personally, I find it a bit tiring that the usual
| response coming from the vim userbase towards someone not
| liking vim is either a) you obviously didn't learn it
| well enough, or b) you must be a bad programmer.
|
| Sure, vim is a great tool, but it's just _a_ tool. You
| 're perfectly allowed to not like it and/or prefer to use
| other tools.
| loloquwowndueo wrote:
| I'm using vim precisely because its modal - multi-key combos hurt
| my hands, modal has me doing fewer finger contortions.
| eviks wrote:
| You can also rebind combos to not hurt
| behnamoh wrote:
| I need to get some fresh air and listen to peaceful music to
| forget that I saw this! Vim has been one of the best discoveries
| of my life BECAUSE of its modes, and I've taken that modal
| approach to my browsers, VSCode, etc.
| weaksauce wrote:
| If you don't already do it the neovim extension for vscode is
| nights and days better than the one trying to emulate vim in
| javascript.
| behnamoh wrote:
| I tried both (mainly to use my neovim extensions) but
| unfortunately it was buggy (around 6 months ago) for me. Has
| it gotten more stable now?
| weaksauce wrote:
| the only time i've seen any bugs is when the neovim version
| lagged behind what they require in the project. i would
| work but not well. upgrading neovim fixed it for me.
|
| though, like any project, there are probably bugs at the
| edges... not sure what bugs you are experiencing however.
| angvp wrote:
| Oh man, I'll give you an E- for the effort.
| segfaultbuserr wrote:
| 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).
| jrm4 wrote:
| 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.
| dinkleberg wrote:
| Everyone has their preferred setup, so I guess it is cool that
| this exists for that reason.
|
| But come on! Learning vim bindings is one of life's greatest
| pleasures. Once you're hooked you'll hate any non-mode based
| editors.
| quickthrower2 wrote:
| Guess I never got hooked!
| rflec028 wrote:
| As both an avid vim and emacs user, and a lover of both:
|
| This is heresy!!!!!!!!!!
| jjcm wrote:
| 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.
| csdvrx wrote:
| > 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 :)
| arcanemachiner wrote:
| 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...
| kevindamm wrote:
| Ctrl-Q _whew_
| csdvrx wrote:
| > 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)
| aidenn0 wrote:
| Related: why does the shortcut to delete back a word
| (^W), close my browser tab?
| pests wrote:
| Delete current word, delete current tab. Its related.
| troupo wrote:
| 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)
| bloopernova wrote:
| 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.
| anthk wrote:
| 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.
| bloopernova wrote:
| 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.
| anthk wrote:
| 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.
| artsi0m wrote:
| I use emacs and I respect emacs developers, but it is not
| originally emacs bindings: http://unix-kb.cat-v.org/
| airspresso wrote:
| This still happens to me too often. Especially annoying
| in web-based editors.
| cerved wrote:
| it also switches focus window, which is makes things even
| more confusing
| whackx wrote:
| That gets me multiple times a day. What is even worse is
| ^h opens the history instead of just deleting the last
| character.
| shiomiru wrote:
| > 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.
| kamray23 wrote:
| 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.
| ttyprintk wrote:
| We should concede that /etc/profile ought to disable that
| with stty by default.
| u801e wrote:
| > 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.
| ttyprintk wrote:
| Remapping Ctrl-O denies the ability to switch modes. That's
| what turns this from simply an opinionated config to a
| breaking change.
| csdvrx wrote:
| That's fair, changes should try to preserve existing uses
| redundantly wrote:
| > 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...
| reactordev wrote:
| 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
| puree. 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.
| redundantly wrote:
| You can make it with homemade butternut squash puree too,
| and it will taste better because of its sweetness. Give it
| a try sometime.
| reactordev wrote:
| 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.
| Waterluvian wrote:
| Apparently coffee cake has no coffee in it so we really
| can't believe anything anymore.
| reactordev wrote:
| Oh but mine does... the glaze is powdered sugar and
| espresso.
| Waterluvian wrote:
| My life has been a lie. That sounds incredible.
| reactordev wrote:
| 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).
| nrabulinski wrote:
| 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
| IndrekR wrote:
| To confuse matters more, in this part of EU the coffee
| cake is made with coffee and tea cake is made without
| tea.
| hyperthesis wrote:
| pie you have pumpkin with
| shrikant wrote:
| You owe me a new keyboard and monitor tyvm
| kybernetikos wrote:
| Were you drinking hot computer tea when you read that
| comment?
| twic wrote:
| Oyster stout _shouldn 't_ have oysters in, but usually
| does.
| pbininda wrote:
| The cake is a lie.
| edgyquant wrote:
| This sounds good but not the kind of coffee cake I'm used
| to
| reactordev wrote:
| yellow or moist white cake (or marbled cake) with butter
| crumble brown sugar top and an espresso glaze. The coffee
| cake of coffee lovers.
| mikepurvis wrote:
| But coffee cake is the cake you have _with_ coffee, not
| made from it.
| timc3 wrote:
| Not true. Standard staple in my oarents house was coffee
| cake made from coffee with walnuts.
| akho wrote:
| well maybe pumpkin pie is a pie you have with pumpkin
| nickt wrote:
| Wait until you learn about Tunnock's Tea Cakes.
| twic wrote:
| There's no tea, and they aren't cakes - but there is a
| whole fresh Tunnock in every one!
| beAbU wrote:
| Next you are probably going to tell me black forest cake
| is not made in the black forest any more.
| paholg wrote:
| American coffee cake doesn't have coffee, but English
| coffee cake does.
| bregma wrote:
| Wait until you find out what baby food is really made of.
| code_duck wrote:
| In Australia it's known as "butternut pumpkin". Anyway I
| always used kabocha squash.
| jessekv wrote:
| +1 kabocha rules in pie
| jb1991 wrote:
| In most places in the world, the word "pumpkin" refers to
| squash. A squash pie is also a pumpkin pie.
| reactordev wrote:
| 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.
| trws wrote:
| 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.
| ;)
| FiskFisk33 wrote:
| 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.
| notatoad wrote:
| if you're looking for a good pumpkin pie alternative
| while pumpkins are out of season, sweet potato pie is
| also excellent.
| zehaeva wrote:
| 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.
| reactordev wrote:
| 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.
| zehaeva wrote:
| 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.
| kazinator wrote:
| 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.)
| myrandomcomment wrote:
| 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, puree them and freeze until needed. We also
| make a lovely spicy Indian style pumpkin soup from the puree.
| The pie is quite different from any store purchased pie and
| well worth it.
| jb1991 wrote:
| In most countries outside the US, squash is called pumpkin.
| Ensorceled wrote:
| > In most countries outside the US [and Canada], squash is
| called pumpkin.
| jb1991 wrote:
| 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.
| scythe wrote:
| 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.
| mportela wrote:
| > 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
| thayne wrote:
| 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.
| mypalmike wrote:
| 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.]
| joenot443 wrote:
| > 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.
| bluedino wrote:
| 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...
| Modified3019 wrote:
| 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.
| goldenshale wrote:
| 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.
| tester457 wrote:
| Helix is beginner friendly. It's keybindings make more sense
| than vim's.
| Lio wrote:
| 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.
| benrutter wrote:
| 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.
| ttyprintk wrote:
| 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.
| xigoi wrote:
| Overleaf, for example, supports most of Vim's bindings.
| broscillator wrote:
| 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).
| linsomniac wrote:
| i3 window manager leans heavily on vim defaults for
| navigating windows.
| allarm wrote:
| Shells have Vi mode: bash, fish, zsh.
| IggleSniggle wrote:
| 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.
| flkiwi wrote:
| 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.
| scythe wrote:
| >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...
| Symmetry wrote:
| 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.
| Hamuko wrote:
| 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
| hegzploit wrote:
| for a moment there, I was wondering why they'd install a
| JavaScript engine in a tesla.
| Hamuko wrote:
| 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-202
| 1...
| IggleSniggle wrote:
| Noice.
| globular-toast wrote:
| 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.
| diggan wrote:
| > 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.
| quesera wrote:
| 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.
| jerpint wrote:
| It's similar to preferring guitar hero because a real guitar
| has too many frets and too many chords to learn
| berkes wrote:
| 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?
| cwillu wrote:
| More like learning the clavicord.
|
| "But your fingers aren't touching the strings!"
| scotty79 wrote:
| > 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.
| deadbabe wrote:
| I disagree. It makes no more sense than turning a modeless
| editor into a modal one. Just use the right tool for the job.
| bluish29 wrote:
| > 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.
| asicsp wrote:
| See also: https://github.com/tombh/novim-mode (Plugin to make Vim
| behave more like a 'normal' editor)
| abraae wrote:
| 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.
| csdvrx wrote:
| > 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.
| pastage wrote:
| 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.
| ttyprintk wrote:
| 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.
| csdvrx wrote:
| 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/
| augusto-moura wrote:
| 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...
| sfRattan wrote:
| 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.
| alentred wrote:
| 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.
| livrem wrote:
| 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.
| ttyprintk wrote:
| 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.
| rand0m4r wrote:
| Speaking about mswin.vim which does mostly what this does:
| what's the point of this project.
| alberth wrote:
| 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...
| jfoutz wrote:
| 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.
| anticodon wrote:
| 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.
| AnonymousPlanet wrote:
| 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.
| broscillator wrote:
| I just tried this on my laptop and it is the most
| uncomfortable thing I've done on a keyboard.
| tmtvl wrote:
| 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).
| jholman wrote:
| 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.
| artsi0m wrote:
| Emacs has a mode called cua-mode with keybindings thats more
| simillar to ones from other modern gui programms like browser.
| nhumrich wrote:
| I have found "micro" to be a really good "modeless" alternative
| to vim
| naruhodo wrote:
| Yeah, same. However, it is a pain to install on some systems
| because, for example, the Ubuntu package installs a debug build
| that puts a log text file (or similar, I forget the details) in
| $CWD everywhere you go. So you end up downloading a binary off
| Github, which feels dirty to me. And there are some other micro
| configuration tweaks I like to do.
|
| I'm definitely going to compare this against micro.
| bpshaver wrote:
| What's wrong with "modal"? I don't think "modeful" is a word.
| jdeisenberg wrote:
| See
| http://worrydream.com/refs/Tesler%20-%20A%20Personal%20Histo...
| (specifically the sidebar "How Modes Degrade Usability")
| There's also a sidebar "Objections to Modeless Editing and
| Cut/Copy-Paste"
| viraptor wrote:
| I think you misread/misunderstood OP.
| bpshaver wrote:
| My point was just that "modeful" isn't a word. Vim is a
| "modal editor." The article you cite does not include the
| word "modeful."
| jdeisenberg wrote:
| Ah, now I understand. My apologies.
| agumonkey wrote:
| I'm not sure modeless has meaning. It's just an initial mode map
| in a way.
| quasarj wrote:
| Blasphemy!
| decafbad wrote:
| I'm honing my sword.
| asix66 wrote:
| 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.
| danra wrote:
| Good to know.
|
| Of course, I did have to google how to quit easy vim.
| hobabaObama wrote:
| for any one wondering
|
| cntrl-o --> to get to normal vim mode
|
| then exit as usual
| lancebeet wrote:
| It's apparently also possible to do Ctrl-q to quit directly
| (it runs :confirm qall).
| rgoulter wrote:
| > 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`.
| sweetjuly wrote:
| 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.
| thih9 wrote:
| > 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.
| a-dub wrote:
| this is violence. i never knew it was possible to emit a shitpost
| in the form of a github project, i am simultaneously disgusted
| and humbled.
| null_point wrote:
| 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?
| wanderingstan wrote:
| Happens often when one needs to ssh into a remote server and
| edit some files, sometimes with tmux to boot.
| nextlevelwizard wrote:
| Why not use vscodes ssh plugin? Feels like that is what you
| actually want.
| ilaksh wrote:
| I currently use vim every day. I have been trying to learn vim
| off and on for about 30 years.
|
| vi and vim have modes because they were created in an era where
| computing and terminal capabilities were very limited and even
| when the terminals could support interactive editing, it wasn't
| expected. They had very low expectations. They were used to
| things like 'ed'.
|
| The religious beliefs that programmers have about vim are a case
| study in why I believe that AI will easily take control of the
| planet in less than a century.
|
| That sentence is questionable in multiple ways.
|
| Anyway, I will definitely try this thing out. Hopefully I am not
| too lazy to keep installing it. That's what happened with the
| last one of these.
| a-dub wrote:
| > vi and vim have modes becaus they were created in an era
| where computing and terminal capabilities were very limited.
|
| that's the whole point. it was designed for limited terminals
| and high latency, very slow serial links. that means when you
| learn it and all of its shortcuts and you have a fast and
| modern terminal, you are able to edit at ludicrous speed.
|
| it's like training at altitude or running with weight belts for
| editing text.
| ilaksh wrote:
| I just don't believe that the average vim users edits
| significantly faster than non vim users.
|
| I mean, maybe 5% faster. Sure. Maybe. But at what price? _At
| what price, I ask you??_
| anticodon wrote:
| I don't know how faster I became at editing text after
| switching to vim. But it definitely has a different
| feeling: the text just flows from the fingers. Your mind is
| never interrupted to remember some shortcut e.g. to select
| text inside the brackets or inside the quotes. Anything you
| want to do with text happens effortlessly with the speed of
| thought.
|
| Definitely worth it.
| wruza wrote:
| For me it's somewhat slower at the price of freeing my mind
| from "ctrl-shift-left-wait-wait-oops-right-right"-like
| things. I believe that _faster typing_ in vim is a myth
| supported by our adepts, who are more zealous than is
| reasonable.
| wolverine876 wrote:
| Another claimed impact is on cognitive load: Vim runs on
| muscle memory on the keyboard; it consumes as much
| cognitive load as typing. Mouse / GUI is distracting.
| zogrodea wrote:
| I'm a Vim user, but I don't agree with that argument
| about cognitive load. When typing in a normal editor, you
| just type letters and those same letters typed just show
| up on a screen (as in Vim's insert mode). The mouse is
| pretty intuitive too in a normal editor: you have a
| device that controls a cursor on your screen and clicking
| performs an action.
|
| With Vim, I don't think the commands are quite as
| intuitive (this might be a skill issue of mine), but I do
| think I am faster without a mouse because of fewer
| movements required (having to grab my mouse, move it to
| where I want, click and then move it back to the keyboard
| vs. just typing a few letters).
| beautron wrote:
| For me, Vim is not only (drastically) faster, but also more
| fun.
|
| In Vim, I enjoy the process of text editing _itself_ (in
| addition to any joy derived from the substance of the text
| edited).
| delta_p_delta_x wrote:
| > you are able to edit at ludicrous speed
|
| I never ever got this argument for Vim.
|
| I don't spend most of my time slinging around huge chunks of
| text or repeating commands like they do in YouTube videos
| where Vim pros flex their skills (to extend the fitness
| metaphor).
|
| I spend most of my time thinking about code design, reading
| documentation, writing plans, discussing stuff with my
| colleagues--editing, writing code is maybe 30 - 40% of my
| time, at best. I also code fairly slowly anyway.
|
| Funnily enough I think I'm decent enough with a good touch
| pad, so I can avoid the whole 'click-drag' dance when I have
| to use a mouse.
|
| That being said, I do consider myself too stupid to use Vim
| beyond the simplest commands--I know how to change modes,
| save, and exit.
| a-dub wrote:
| > I spend most of my time thinking about code design,
| reading documentation, writing plans, discussing stuff with
| my colleagues--editing, writing code is maybe 30 - 40% of
| my time, at best. I also code fairly slowly anyway.
|
| ahh yes, the central brooklyn coffee shop as existential
| bus stop school of computering. "oh, you're 38 too, well
| then what are you doing with your existential crises?"
| "well, when i'm not working on my book, i like to think
| about code design and discuss stuff with my colleagues
| while listening to instrumental remixes of 90s punk and
| indie rock classics. my preferred languages are ocaml,
| erlang and ruby, but usually i tend towards microsoft
| visual foxpro for professional efforts."
| delta_p_delta_x wrote:
| I don't get the point of this comment, nor do I fit the
| stereotype at all.
|
| I'm in my 20s, find coffee shops extremely overpriced,
| have never set foot in New York City, don't listen to
| much music at all (and if I do, it's classical and
| Baroque from the 1700s), and usually write in C# or C++
| (both in Visual Studio).
| viraptor wrote:
| > vi and vim have modes because they were created in an era
| where computing and terminal capabilities were very limited
|
| vim was released in 1991. Same year linux kernel started and
| Apple PowerBook came out. Limited terminal capabilities is not
| the reason vim is modal.
| wolverine876 wrote:
| Vim was heavily based on vi, and vi was designed for limited
| terminal capacities.
| viraptor wrote:
| And it's now been decades since vi itself, where things
| would've changed many times if that was the only reason
| that vi was modal.
| ilaksh wrote:
| Things have changed, just not the paradigm that vim
| operates on.
| stevebmark wrote:
| I've always disliked that Bram calls Vim a "modal" editor. All
| this means is your keyboard and mouse actions do different things
| based on what "mode" of the editor you're in. All editors are
| "modal" editors. In VSCode for example, if you've focused the
| search box, pressing up loads the previous search, compared to if
| you've focused the code area, pressing up goes up a line.
|
| Vim purports to be more efficient than other editors because it's
| a modal editor, but that's nonsense.
| schainks wrote:
| Not all modal editors are created equal?
|
| Once fluent in vim, I could literally get more done in the same
| amount of time, but YMMV.
| colordrops wrote:
| That's not really the same thing though is it? Each of vim's
| modes are extremely complex with their own usage of the vim
| grammar. The "modal" behavior you describe is very simple.
| stevebmark wrote:
| They are the same thing of course, complexity is not relevant
| to the definition.
|
| The main difference is Vim's editing modes are imperative.
| You have to glue together small painful commands to do what
| you want. Modern editors are declarative - you say "I want to
| move this file" or "I want to rename this variable" or "I'll
| drag this split here" and they do the rest.
| minitech wrote:
| > Modern editors are declarative - you say "I want to move
| this file" or "I want to rename this variable" or "I'll
| drag this split here" and they do the rest.
|
| Those are imperative actions rephrased to make an
| artificial distinction (and I rename variables in Vim with
| gR). How high-level the available actions are and being a
| modal or non-modal editor are orthogonal.
| beautron wrote:
| > You have to glue together small painful commands to do
| what you want.
|
| Painful?
|
| Physically or mentally?
|
| Physically I find Vim to be pain-free. I've studied and I
| practice good typing form, which is important--I would look
| there before blaming any physical pain on Vim's commands.
|
| Mentally I find Vim's interface to be beautiful. Learning
| it gives your mind an amazingly coherent structure for
| thinking about the process of text editing.
| colordrops wrote:
| It wouldn't be disingenuous to call the F1 a race car just
| because a go-kart is also technically a race car. Vim is
| built around modal editing. It's entire workflow is built
| around it. Your argument is pedantic.
| broscillator wrote:
| A GUI element is not a mode, categorically.
| nextlevelwizard wrote:
| You are confusing modes with different programs.
|
| In VSCode you have your editor program in the middle that does
| the editing things. Then when you invoke your search box it
| over takes the control away from your editor program and you
| are now in the search program which behaves however differently
| it behaves.
| thekiptxt wrote:
| What makes you think that having the focus on the search box vs
| the code area in VSC constitutes a different mode in the same
| way as vim normal vs insert modes? You haven't explained what
| you consider a mode to be.
|
| I think there is something very clearly different in vim, as
| first time users must have it explained to them that typing `j`
| when their cursor is at the start of the code area will do very
| different things depending on the mode they're in. It's a
| paradigm not present in editors like VSCode. This difference is
| usefully characterized as "modal".
| teo_zero wrote:
| Saying that VSCode is a modal editor because of the search
| dialog is like listing cars among USB peripherals because they
| have a USB port.
| eviks wrote:
| That's a bad example since search box is a different UI element
|
| Here modality mainly means "for the same element" (text area),
| and this is a very important and noticeable difference you
| can't eliminate with a search box
| wolverine876 wrote:
| Unlike the VSCode example, Vim's multiple modes utilize the
| exact same content and UI:
|
| With your cursor in the same place, and pressing the same keys
| on your keyboard, Vim's response will change based on whether
| you are in normal mode, insert mode, visual mode, or whatever
| mode.
|
| That's what they mean by modal. In insert mode, you have a ~104
| keys that insert new text. In normal mode, the same ~104 keys
| execute editing functions.
|
| The magical efficiency is because of its modal nature: Without
| buying new hardware, by switching modes (at a keystroke) you
| have a magic input device that issues ~104 different editing
| commands each with one keystroke, and hundreds more with two-
| key combinations (shift+, ctrl+, etc.).
| beautron wrote:
| Modes are the core concept on which Vim's design is structured.
| They organize both the interface and the user's mental model of
| the text editing process. I did a quick case-insensitive search
| over Vim's help files, and they matched 'mode' 4470 times.
|
| The first thing you must learn (to use Vim) is that it is
| modal. And this detail _really_ tends to stand out when first
| meeting Vim. I think "modal" is a nice word to concisely
| describe and differentiate Vim.
| Ferret7446 wrote:
| There are 13875 matches for mode in the Emacs docs.
|
| Modes are even more foundational to Emacs than to Vim. A new
| user will encounter a dozen modes by simply starting to use
| Emacs for a few minutes. Every buffer has a major mode, and
| there can be many minor modes enabled per buffer or globally.
| The entire editor is built on a tree of modes, all inheriting
| from the aptly named Fundamental Mode.
|
| At a basic level, each mode affects what every key does. The
| idea of keys doing different things in different modes is not
| unique to Vim.
|
| Which just goes to show that Vim's definition of "modal" is
| somewhat contrived, as Vim's definition of "modal" applies to
| a very specific implementation of two to four modes (which
| coincidentally Emacs also offers multiple versions of, both
| natively and as third party packages to varying degrees of
| faithfulness).
| beautron wrote:
| Emacs uses the word "mode" to mean something different than
| Vim does.
|
| An Emacs "mode" corresponds more closely to what Vim calls
| "plugins" (Emacs's "major modes" are like Vim's "filetype
| plugins", and Emac's "minor modes" are like Vim's other
| "plugins").
|
| Vim's modes are more foundational in the sense that _all_
| Vim plugins are structured and organized in terms of the
| same set of modes. The core of Vim is the modes (insert,
| command, etc.), which are then customized. Emacs calls the
| customizations themselves "modes".
|
| I don't consider Vim's definition of "modal" contrived, and
| I don't consider Emacs to be "modal" in the same way
| (though you can of course customize it to be).
| beautron wrote:
| > Vim purports to be more efficient than other editors because
| it's a modal editor, but that's nonsense.
|
| My understanding is that Vim purports to be efficient because
| it lets users make precise edits (large or small) with minimal
| input.
| bregma wrote:
| The VS Code behaviour you're describing is "focus contextual"
| rather than "modal". Modal behaviour means the behaviour can
| change modes within the exact same focal context.
| kagevf wrote:
| emacs has CUA available and another comment mentioned there's an
| "easyvim". My point being that those editors already support
| those features.
| nextlevelwizard wrote:
| Is this so you can look cool and say you "use vim btw" while not
| getting any of the benefits of using vim?
| Aaronmacaron wrote:
| > 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
| fandalf wrote:
| just use gedit then?
| laserbeam wrote:
| 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 :(
| AlchemistCamp wrote:
| You can learn the basics in under 15 minutes.
| TuringTest wrote:
| 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.
| airspresso wrote:
| 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.
| laserbeam wrote:
| 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.
| AlchemistCamp wrote:
| 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.
| wruza wrote:
| 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.
| cassepipe wrote:
| 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 /)
| bharrison wrote:
| This is precisely my use case for using vim exclusively, and
| why I force myself to operate with a minimal config.
| bigstrat2003 wrote:
| 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.
| bharrison wrote:
| 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.
| dualogy wrote:
| 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.
| vintermann wrote:
| 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?
| jokethrowaway wrote:
| pretty cool you can do that!
|
| nano syntax highlighting is not as good as vim but it can work -
| the problem is in a lot of places there is nothing but vi
|
| if you can configure vim you probably can also just install nano
| so it's unlikely this will get any use
| thih9 wrote:
| I guess now I know how experienced emacs users feel about me
| always using evil mode.
| oneshtein wrote:
| 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.
| amne wrote:
| 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.
| arnklint wrote:
| That's a whole lot of code to not have to learn 10 keystrokes.
| cassepipe wrote:
| 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
| LAC-Tech wrote:
| I'm down for modeless TUI editors. This idea that because I like
| to work in the terminal I must prefer modes is accidental.
|
| I used micro for a while, which was quite pleasant, but didn't
| have all the LSP goodness.
| Yasuraka wrote:
| It is sad that it is a plugin instead of a core feature and a
| buggy one at that (https://github.com/AndCake/micro-plugin-
| lsp), it's the last missing piece to transform a really good
| choice into the de factor killer
| vkoskiv wrote:
| Personal anecdote: I've used Vim for many years, but I never
| progressed much beyond the basics, because I almost never put
| much active effort into learning more advanced motions. About a
| year ago, I discovered the Helix editor, which has a (IMO) genius
| feature, where pressing a key to start a motion or other action
| pops up a little pop-up box that shows all the possible options.
| It just perfectly clicks with my brain, I can easily ignore the
| pop-up once I've got the muscle memory, or I can even disable the
| pop-ups altogether. It's brilliant for discoverability.
|
| With this, I've passively memorized far more advanced motions in
| the last 12 months than I did in the ~8 years before that. And
| since Helix is a vim style editor, many of these motions also
| work in vim!
|
| I feel like Helix is the perfect editor for people like me who
| know just enough vim to be comfortable, but never got very deep
| into customizing or muscle memory with advanced motions. Helix
| does some things differently compared to Vim, which I hear puts
| off some more advanced Vim users.
|
| The built-in LSP & highlighting support with a stack-based "jump
| to symbol" and keybinds to traverse the stack also perfectly maps
| to how I want to navigate code, it has made me far more
| productive than ever before.
|
| I'm not affiliated with the project myself, I'm just super happy
| I found the perfect editor for me :]
| Malcolmlisk wrote:
| There is a well known plugin for neovim to do this kind of
| behavior. You can even create your own hotkeys into that plugin
| and will help you navigate and memorize different hotkeys for
| the editor. The plugin is called whichkey, and this is their
| github https://github.com/folke/which-key.nvim
| rodrigodlu wrote:
| I'm today a neovim heavy user, but even using lazyvim,
| there's a lot missing with which key. Helix seems to be more
| out of box.
|
| I'm also restarted my journey with neovim after helix.
|
| Actually lazyvim convinced me to give another chance, because
| the community packs and mason makes lsp so convenient!
|
| Astronvim is also a good contender, but I broke it so many
| times trying to customize.
| oblio wrote:
| Off-topic: does Neovim have a stable GUI distribution that
| runs well on Windows and includes fuzzy file search and a
| file explorer?
| onehair wrote:
| - For GUI https://github.com/neovide/neovide
|
| - For Fuzzy file search you will need to add Telescope
| plugin
|
| - For File Explorer, you could use Neo-tree.nvim
| thworp wrote:
| I don't think there is a pre-packaged flavour of this.
| You'd have to use a plugin manager for neovim to install
| fzf.nvim, telescope and nvimtree. If you want to use nvim
| more extensively I'd recommend a config bundle like NvChad,
| AstroNvim or NvPunk, those are mostly cross-platform (might
| require a few utils like ripgrep, stuff for LSP). They
| already come with all of this pre-configured and you can
| disable any plugins you dont like easily. They're also
| suprisingly snappy thanks to conditional plugin loading.
| avgcorrection wrote:
| Emacs has something similar in which-key.
|
| Of course GUI apps have had pop-downs from the File-Edit-
| View-... row [since forever?] so that things like Alt+F will
| show contextual actions. But at least in the Emacs community
| people get blown away when someone makes such a basic addition.
| BeetleB wrote:
| You can also use Hydra for Emacs.[1] Once I discovered how to
| configure Hydra, I made it a habit to make one for every new
| major mode I need to use.
|
| [1] https://github.com/abo-abo/hydra
| nequo wrote:
| In Emacs, you can also insert C-h in a key combination. So
| you can do the basic things like C-h k to
| pull up the help for a key combination C-h f for a
| function C-h v for a variable C-h m for
| currently active modes
|
| But you can also do things like this: C-c C-h
| to pull up every key combination that starts with C-c
|
| Emacs has excellent discoverability out of the box thanks to
| this.
| avgcorrection wrote:
| Yeah I love how you can interrogate things like that.
|
| Meanwhile, in GUI land: here's fifteen screenshots
| carefully manually highlighted which shows you how to
| change your language to Turkish.
|
| Regular GUI apps are just too rigid.
| kqr wrote:
| This is also how magit works, and I agree it's fantastic. Using
| magit has taught me so much more about command-line git than my
| past 12 years with it in the command line.
| hiAndrewQuinn wrote:
| LazyVim comes with this as well, although with a 1 second delay
| or so in case you've already got it in muscle memory.
|
| It's the Neovim flavor that Shell Bling Ubuntu [1] installs,
| though, so I'm biased. I've been considering including an
| option to install `hx` as well in there.
|
| [1]: https://github.com/hiAndrewQuinn/shell-bling-ubuntu
| nightowl_games wrote:
| There's a great write-up of a great set of utilities!
| micheljansen wrote:
| Nice! I have memorised a lot of Vim actions over the years, but
| this would still absolutely help me a lot. I would love to have
| this for (Neo)Vim.
| RMPR wrote:
| There's a plugin for that called which-keys
| micheljansen wrote:
| Thanks, this sent me down a rabbit hole of NeoVim plugins,
| but I've enabled it now :)
| neoden wrote:
| The main difference between Vim and Helix is that Helix is not
| hackable at all. Its configuration allows only very basic
| settings. It is impossible to change almost anything in its
| behaviour. So it focuses on being good out of the box. Whether
| it succeeds or not is for everyone to judge for themselves.
| diggan wrote:
| Seems at least extensability is on the mind of the Helix
| team:
|
| > There's two prototypes we're exploring that could
| potentially exist side by side: a typed list/ML-like
| implementation for scripting and a Rust based interface for
| things that require performance. Could potentially run both
| in wasm but I'm personally a bit unhappy with how big wasm
| implementations are, easily several orders of magnitude
| compared to the editor
|
| https://github.com/helix-editor/helix/wiki/FAQ#how-to-
| write-...
|
| So they're not avoiding making it extensible on purpose,
| seems they haven't found the right way to do it yet.
| bobbyskelton41 wrote:
| https://github.com/helix-editor/helix/pull/8675
| jayflux wrote:
| I think Helix have gone the right way around with their
| priorities. They've started by making the right things built-
| in that most developers would need on a day-to-day basis.
| It's already better than configuring vim/neovim in that
| regard as it just works out of the box. An example is having
| Tree-Sitter and LSP already configured, so you get the best
| syntax highlighting available, and IDE-like functionality.
|
| The customizability/hackability will come later, they're
| working on extension support plus other stuff, but I think
| for most of their users, this isn't the number 1 priority.
|
| I guess their target users are those who just want to get up
| and running on a modal editor without spending too much time
| in Lua or trying to get plugins setup.
| seanw444 wrote:
| I think they went the right way too, and I say that as
| someone who mains heavily-configured Emacs. I like
| installing Helix in a fresh environment by just bringing
| the .exe and being able to get right to work with all the
| features I need.
| ploum wrote:
| There's also Kakoune, which is very similar to Helix.
|
| See https://andreyor.st/posts/2023-09-20-why-kakoune/
| sheepscreek wrote:
| Kakoune makes no claims to be Vim compatible though. The
| keystrokes are completely different.
| xigoi wrote:
| Helix is not Vim-compatible either.
| Conscat wrote:
| One big difference between Helix and Kakoune is that Helix
| has a visual mode, whereas Kakoune only wants chording to
| extend text regions.
| graemep wrote:
| I recently started using Helix too and it does what I want out
| of the box and is the first modeless editor that really works
| for me.
|
| I am sure you can set up vim to be very much the same, but that
| is a significant barrier to getting started. I have tried and
| had problems getting it as I wanted.
|
| The problem is that the keys are different from vim so the
| muscle memory does not work across the two.
|
| I would really like to have a more lightweight editor with the
| same key bindings for quick edits on small files.
| dingnuts wrote:
| Of course, Spacemacs provided this functionality out of the box
| ten years ago using evil-mode (which is actually vim, so all
| the motions work in vim too, not just some of them) and which-
| key ten years ago and it's simple to set up in vanilla Emacs
| too, even for a beginner (I know because this was the path I
| took as a beginner)
| Skunkleton wrote:
| Spacemacs is a good project, but it certainly isn't easier to
| set up than helix. Helix literally requires zero
| configuration to enable this functionality.
| hannofcart wrote:
| 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!
| radiKal07 wrote:
| > 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?
| mcluck wrote:
| 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?
| onehair wrote:
| 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
| cassepipe wrote:
| 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.
| bigstrat2003 wrote:
| Are you serious? That's incredibly cryptic. The fact that you
| learned it doesn't make it intuitive for others.
| anthk wrote:
| I prefer vis. It has structural regexen, a la Sam in plan9, much
| better than the old s,foo,bar, syntax.
| jovial_cavalier wrote:
| Does anybody really struggle so much with vim that in the
| occasional circumstance they have to quickly edit files on a
| remote server, they are totally brickwalled, and need to install
| a total conversion config?
|
| That seems insane to me. A few years ago I decided to "get good"
| at vim, and I learned a handful of new tricks. A few new ways to
| select text, macros, new ways to navigate, etc. But before that,
| I was perfectly capable of navigating documents and editing them
| with the arrow keys, just using "i" and "<Esc>".
|
| It seems like the only person for whom this would be helpful is
| someone who has no clue what vim is, and doesn't understand modes
| _at all_. That kind of person is likely not going to be able to
| even find this repo, let alone install the configuration.
| greatNespresso wrote:
| 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.
| adamtajti wrote:
| Hilarious!
| jacky2wong wrote:
| I use VSCode + Vim. I found that largely replaces the need for a
| modeless vim. Is there an advantage of using it over my current
| setup?
| mikl wrote:
| 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.
| imbnwa wrote:
| 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
| 3v1n0 wrote:
| 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)
| soap- wrote:
| I was using micro. I still love it, but the syntax highlighting
| for ruby is very messed up
| a-saleh wrote:
| T.b.h. I mostly use vim with keyboard movement in insert mode
| enabled, so ... 80% time I don't really use modes.
| cassepipe wrote:
| It's like using a bike as a scooter. It works but...
|
| Have you tried remapping CapsLock to Escape so now you have a
| quick access to the most important key of your editor and can
| actually enjoy it ? Most vim users do it but they never talk
| about it and the beginners have no clue and suffer needlessly
| from this historical accident.
| cassepipe wrote:
| 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.
| wruza wrote:
| "Doesn't mean it's good" doesn't mean it's a problem either.
| Also, people prone to remapping already have their Ctrl there.
| cassepipe wrote:
| 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.
| carb wrote:
| What do you do when you need Ctrl in non-vim contexts?
| cassepipe wrote:
| 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
| carb wrote:
| 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...
| carb wrote:
| 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
| hmeh wrote:
| Por que no los dos? I map caps lock to escape on tap, ctrl
| on hold.
| lozf wrote:
| ... and set "Both Shift Keys" to toggle caps lock.
| camtarn wrote:
| > 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.
| MSFT_Edging wrote:
| 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.
| dinkleberg wrote:
| Haha I'd hate to know the number of form modals I've closed
| out of after instinctively hitting escape.
| cassepipe wrote:
| 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 :)
| joenot443 wrote:
| > 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!
| zeroxfe wrote:
| Yes, CapsLock is useless, and I've been remapping it to Ctrl
| since forever, which serves me a lot more than Esc.
| cassepipe wrote:
| It can be both if you care to. You don't have to choose
| Toorkit wrote:
| 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.
| sodapopcan wrote:
| Best use for capslock in my book is tap for escape, hold for
| ctrl.
| ta988 wrote:
| Where do you map it that way?
| ink_13 wrote:
| Karabiner-Elements will do this for you on Mac.
|
| I consider it indispensable.
| sodapopcan wrote:
| 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.
| linsomniac wrote:
| Ooh! Can I do this with "z" and "/" (letter if tapped,
| control if held)?
| sodapopcan wrote:
| 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.
| sodapopcan wrote:
| 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"
| } ] } ]
| } ] }
| wonger_ wrote:
| I use this executable for Windows:
| https://github.com/ililim/dual-key-remap
| svilen_dobrev wrote:
| 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' )
| joenot443 wrote:
| That sounds awesome! I'm going to look into that.
| joshmanders wrote:
| 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"
| TotempaaltJ wrote:
| 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.
| joshmanders wrote:
| 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.
| sodapopcan wrote:
| > 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? ;)
| e12e wrote:
| But caps lock is remapped to control already! :)
| aldanor wrote:
| You can have both. Esc on tap, ctrl on hold.
| teeray wrote:
| This is the proper functioning for this key
| e12e wrote:
| On a Mac?
| bori5 wrote:
| WHAT? HOW AM I GONNA TYPE MY SENTENCES THEN!?
| crunchbang-excl wrote:
| 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.
| JBorrow wrote:
| On a Mac you can do this rebinding entirely natively within
| the system keyboard settings.
| dm319 wrote:
| 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.
| tombh wrote:
| 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.
| linsomniac wrote:
| 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.
| michaelcampbell wrote:
| Modeless vim, Emacs "evil mode"... dogs and cats living together.
| It'll be anarchy.
| MantisShrimp90 wrote:
| 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.
| SAI_Peregrinus wrote:
| 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.
| AlienRobot wrote:
| >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<space> = 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.
| bufio wrote:
| The best part of using vim is telling everyone you use vim.
| Aperocky wrote:
| Even the church of emacs have never seen desecration like this.
| xwowsersx wrote:
| 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!
| cmrdporcupine wrote:
| Ok now give it emacs keybindings.
|
| Thanks.
| chrisfinazzo wrote:
| Corollary: xterm-mouse-mode in emacs is an equivalent of sorts
| for the rest of the world, and it is _excellent_.
| MatthiasPortzel wrote:
| 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.
| bornfreddy wrote:
| 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.
| bosquefrio wrote:
| vscodevim is a vim plugin for VSCode.
| krick wrote:
| So, what's next? Lispless Emacs?
| danShumway wrote:
| 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.
___________________________________________________________________
(page generated 2024-01-16 23:02 UTC)