News for hackers. Stuff that matters.
Re:How Did Vim Become So Popular? by licebmi__at__ on Tuesday June 30, 2020 @08:06PM (#23696286)
Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive.

Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who wanted me to do some maintenance and configuration tasks. I knew the basics of command line environments, but I had never setup LDAP, mail or DNS. So anyway he asked me to setup some repository on yum, and well, at least I knew how to do that. When he saw me using vi commands to quickly edit the file, he stopped the interview, arguing that anybody who was fluent on vi, was obviously a seasoned admin and I got the postion. I never had the guts to tell him otherwise.

Re:How Did Vim Become So Popular? by busterarm on Tuesday June 30, 2020 @08:14PM (#23696341)
It's proof enough that you'll figure it out.

Years of interviewing people for my own teams has shown me that understanding your tools (especially to the point of being opinionated about them) is probably the #1 indicator of success.

Re:How Did Vim Become So Popular? by duckfruit on Tuesday June 30, 2020 @10:06PM (#23696949)
Indeed. Someone with the fortitude and discipline to get really good at their tools can probably pick up whatever you throw at them.

Its also a good sign that they might be into technology for its own sake, which also doesn't hurt.

Re:How Did Vim Become So Popular? by noir_lord on Wednesday July 01, 2020 @02:44AM (#23698480)
Where I work we use a lot of jetbrains IDE's and I've been a massive fan of Intellij, I absolutely love it when I can show someone something that makes their life easier.

Whether it's how to implement an external program properly using all the expansions or how to use bookmarks (how people can use an IDE for years and not find that is a good question).

I've always RTFM of whatever tool I'm using as the first step then I go look at the default keybindings to see what else there is.

The one that blows people away though is the custom exporters you can write for data views, oh you want that result set in a PHP array for a test set, yeah Copy as PHP has you.

Intellij is absurdly powerful without writing custom plugins (which is my next step I guess).

Re:How Did Vim Become So Popular? by jng on Wednesday July 01, 2020 @05:15AM (#23699499)
... and Jetbrains IDEs support a plugin called IdeaVIM that provides pretty solid vi/vim emulation.
Re:How Did Vim Become So Popular? by doix on Wednesday July 01, 2020 @07:00AM (#23700112)
IdeaVim is the uncanny value of vim for me. It's so close to being actual vim, but every now and then it does something unexpected and it completely throws me off.

I recorded a macro to change shouldBe([true|false]) to shouldBe[True|False](). Pretty simple: qqf(ds(~$a()<esc>q

But the vim-surround plugin emulation doesn't work properly with macros, so it'd get stuck and instead of just doing n@@ , I'd have to do n@@( , i.e pass the seperator I used for the delete surround command.

It doesn't have fold toggling, so z[a|A] doesn't work. The undo behaves weird, you usually have to do it twice UNLESS you've not moved the cursor since doing the last edit.

The git integration isn't as good as vim-fugitive and I constantly find my self reaching for the mouse to do anything git related, whereas in vim I could do it all with the keyboard.

The plugin gets brought up all the time when people talk about the JetBrains tools and no one seems to mention the short comings.

Re:How Did Vim Become So Popular? by arvinsim on Wednesday July 01, 2020 @12:46PM (#23703542)
Some people are satisfied with the modal editing paradigm of Vim that they don't need its advanced features.
Re:How Did Vim Become So Popular? by okr on Wednesday July 01, 2020 @05:42AM (#23699671)
(intellij sometimes has recurring problems with lost keyboard input under linux+gnome. IdeaVIM is one of the first plugins i disable, when that happens. and it often helps.)
Re:How Did Vim Become So Popular? by chadcmulligan on Tuesday June 30, 2020 @08:24PM (#23696390)
What a great test, and it makes sense - a craftsman cares very much about their tools, an average tech will use the first thing that they're taught.
Re:How Did Vim Become So Popular? by busterarm on Tuesday June 30, 2020 @08:39PM (#23696473)
It's also what's so hard about hiring junior candidates and why so many companies shy away from it.

Truly junior hires don't really know the tools yet. You can't really afford to wait for the rare junior who does, so unfortunately it's not as useful a test in that situation.

That's why I think OP's "seasoned sysadmin" line is perfectly valid. The junior that knows their tools has already cleared the hardest hurdle for most companies. Everything else is trainable through mentorship, but tools usage requires experience.

Re:How Did Vim Become So Popular? by chadcmulligan on Tuesday June 30, 2020 @09:14PM (#23696700)
Indeed, I always advise people who want to be developers to build some stuff to show, to separate yourself from everyone else, and make it easier for the hirer. That is another reason to do it, an IT degree doesn't mean you can write code, as you say the rest can be learnt.
Re:How Did Vim Become So Popular? by jfkebwjsbx on Wednesday July 01, 2020 @07:55AM (#23700436)
An IT degree is not about writing code. Perhaps you are referring to CS.
Re:How Did Vim Become So Popular? by beojan on Wednesday July 01, 2020 @06:03AM (#23699795)
You become used to the first tool you pickup, its ways become "natural", and hence you become opinionated.
Re:How Did Vim Become So Popular? by chadcmulligan on Wednesday July 01, 2020 @11:09AM (#23702244)
I don't know about that, my first tool was vi, I have strong opinions about it :-). I use an all singing IDE (Appcode) now, its not perfect either but works for now.
Re:How Did Vim Become So Popular? by Lio on Wednesday July 01, 2020 @02:20AM (#23698346)
(Funnily enough ctrl-[ is one of my most used shortcuts in vim. It’s a convenient alternative to escape if you map caps-lock to ctrl)
Re:How Did Vim Become So Popular? by pixel_fcker on Wednesday July 01, 2020 @02:49AM (#23698513)
Even better: map held Caps to Ctrl and a tap of Caps to Esc
Re:How Did Vim Become So Popular? by boogies on Friday July 03, 2020 @07:17PM (#23728469)
I map held Caps to Super (so I can switch windows and use other higher-than-application-level shortcuts without leaving the home row in dwm), but yes, definitely don't limit yourself to one use for your keyboard's most convenient key without a use. In X11 it's as easy as

    setxkbmap -option caps:super
    xcape -e 'Super_L=Escape'
(where setxkbmap is built into X, and xcape is a one-command install away). And IIUC you can do this with ~6 clicks in a third-party GUI like https://karabiner-elements.pqrs.org/docs/manual/configuratio... in macOS.
Re:How Did Vim Become So Popular? by griffinheart on Wednesday July 01, 2020 @08:13AM (#23700524)
I really don't like chord like shortcuts, while ctrl and [ are positioned in a way you don't have to contort your hand it kind of requires you to move away from the hjkl row or stretch your pinkies. Consider mapping esc to jk (as a sequence) it works surprisingly well.

  inoremap jk <esc> 
and

  inoremap <esc> <nop>
so that you never use esc again

not having chord like shortcuts was one of the main reasons that led me to try vim over emacs in the beginning, so I kind of think they're "anti" vim.

Re:How Did Vim Become So Popular? by ryan-allen on Wednesday July 01, 2020 @04:22AM (#23699175)
I've been using ctrl-[ for years, but have been experimenting with jj. Now I'm not sure which one I like better!

I switched back to vim+tmux (nvim) a few weeks ago from a number of years using vs-code with the vim keybindings.

I'm still trying to configure my plugins so that I don't feel like I'm repeating myself too often.

Re:How Did Vim Become So Popular? by Lio on Wednesday July 01, 2020 @04:27AM (#23699199)
Having ctrl-[ in your muscle memory has the advantage that it also works in other readline programs that have a vi like interfacee, e.g. bash, zsh and many db consoles.
Re:How Did Vim Become So Popular? by sieste on Wednesday July 01, 2020 @04:37AM (#23699268)
I recommend mapping jk to esc in insert mode (instead of jj), so you remain on the same line if you accidentally use it in normal mode.
Re:How Did Vim Become So Popular? by contravariant on Wednesday July 01, 2020 @07:10AM (#23700169)
Note, don't do this if you're Dutch, words with 'jk', or rather 'ijk' in them are annoyingly common.
Re:How Did Vim Become So Popular? by verytrivial on Wednesday July 01, 2020 @09:06AM (#23700883)
This is now my muscle memory escape key since an embarrassingly cheap Bluetooth keyboard of mine only allowed escape == home button on my Android devices.

Pro Tip: Park the flesh of your left palm near the left ctrl key and use that instead of your pinky for ctrl. I admit this feels a bit weird at first but avoids the need to lift your fingers from the home row. Super bonus: use ^H for backspace. Try it out!

Re:How Did Vim Become So Popular? by teddyh on Wednesday July 01, 2020 @03:35AM (#23698839)
Note: Often Ctrl-3 does the same thing.
Re:How Did Vim Become So Popular? by Lio on Wednesday July 01, 2020 @04:31AM (#23699224)
That's excellent!

That gives a left handed option for escape without leaving the home row. I really like having mirrored shortcuts like that, thank you.

Re:How Did Vim Become So Popular? by 0x008 on Wednesday July 01, 2020 @03:09AM (#23698634)
Omg that is such a game changer for me. way more ergonimic than hitting esc
Re:How Did Vim Become So Popular? by slim on Wednesday July 01, 2020 @02:36AM (#23698437)
You may be using vim wrong. Good for you if you like it that way
Re:How Did Vim Become So Popular? by Lio on Wednesday July 01, 2020 @04:29AM (#23699214)
You're going to have to explain that one because I generally switch back to command mode after every edit so I use ctrl-[ a lot.

I'd be VERY interested to hear why that's wrong and what you do differently.

Re:How Did Vim Become So Popular? by slim on Wednesday July 01, 2020 @09:42AM (#23701198)
my reasoning was : you could have mapped caps lock to ESC but you did not. So maybe you are using CTRL too much (CTRL-V maybe?) which is not the best way to use vim.
Re:How Did Vim Become So Popular? by Lio on Wednesday July 01, 2020 @11:17AM (#23702370)
No your reasoning is way off. I map to ctrl rather than escape because I want to make use of the Insert and Ex mode ctrl shortcuts.

For example, if I want to insert a register into the ex mode command line I use ctr-r <register>.

Or if I want to pop out of insert mode for a single command I use ctr-o.

E.g. inserting opening and closing tags when a suitable plugin isn't present. Insert the opening and closing tag, jump back to command mode with ctrl-o, move backwards and you're ready to insert more text.

Re:How Did Vim Become So Popular? by dhagz on Wednesday July 01, 2020 @10:36AM (#23701802)
Can't speak for everyone, but I use this[1] keyboard most of the time, and it doesn't have a Caps Lock key to remap, but instead has Control where Caps Lock normally is. So using ctrl-[ is much easier than reaching up to the escape key.

[1] https://hhkeyboard.us/pro-classic/

Re:How Did Vim Become So Popular? by jng on Wednesday July 01, 2020 @05:22AM (#23699550)
Using Ctrl-[ is perfectly fine if that's convenient to you. Some people doe "inoremap jj <esc>" and double tap j to exit insert mode. If it's faster for you than pressing regular escape, it's an improvement, and thus good.
Re:How Did Vim Become So Popular? by Steltek on Wednesday July 01, 2020 @10:51AM (#23701984)
Politely, I'd consider rephrasing this in the future. Not everyone springs forth into the world with a 5kloc .vimrc. Everyone is incrementally learning from someone else at their own pace.
Re:How Did Vim Become So Popular? by slim on Wednesday July 01, 2020 @01:10PM (#23703883)
I'll do. Thank you. I did not realise I was mean because english is not my native language
Re:How Did Vim Become So Popular? by cjhanks on Tuesday June 30, 2020 @08:42PM (#23696495)
Yeah, I think you got lucky. He sounds like a great boss. And, he was probably right.
Re:How Did Vim Become So Popular? by teekert on Wednesday July 01, 2020 @03:53AM (#23698975)
Such a thing is a proxy character trade and probably told him enough. I'm in bioinformatics, if an applicant tells me they studied biology but have always run a Linux server at home, I can also stop the interview: hired.
Re:How Did Vim Become So Popular? by atmosx on Wednesday July 01, 2020 @02:09AM (#23698272)
Heh, I would fall for that!