Live data from Hacker News

Vim for Humans

vimebook.com

61–70 of 251 posts

Re: Vim for Humans

#61

The very first thing I do on any default Vim config is :imap kj And then Vim kinda makes sense to me. Pressing each time is such an anti-pattern imho.

C-[ is equivalent to , and is much more natural.

I also bind caps lock to ctrl (setxkbmap -option ctrl:nocaps on a GNU/Linux system), which makes this all the more natural.

Re: Vim for Humans

#62

I wish I could use vim or emacs. I don't know if I'm stupid or something but all of the key bindings, everything you have to remember, it just doesn't make sense to me. I wish there was something like nano + plugins. If I had that I could implement most of what I need (other then auto-completion for a crap load of languages).

I haven't tried it yet, but you reminded me that Slap exists: https://github.com/slap-editor/slap

Re: Vim for Humans

#63

The very first thing I do on any default Vim config is :imap kj And then Vim kinda makes sense to me. Pressing each time is such an anti-pattern imho.

C-[ is equivalent to , and is much more natural. I also bind caps lock to ctrl (setxkbmap -option ctrl:nocaps on a GNU/Linux system), which makes this all the more natural.

I never really liked C-[, kj is just a finger roll away and it's ingrained in my muscle memory now. I try to avoid shift as much as possible as I get a very cramped finger if I have to use shift too much. I have a lot of custom TeX bindings for this as well (i.e. b => {} (braces), p => () (paren)). I even rebound 44 to $$ because I don't type 44 that often anyway.

Re: Vim for Humans

#64

I wish I could use vim or emacs. I don't know if I'm stupid or something but all of the key bindings, everything you have to remember, it just doesn't make sense to me. I wish there was something like nano + plugins. If I had that I could implement most of what I need (other then auto-completion for a crap load of languages).

If it helps, I learned vim by following the most basic tutorial at first (vimtutor), learning how to navigate, save my changes, switch between command and insert mode, and not much more. I then forced myself to use it.

vim's defaults are, honestly, terrible. So you'll quickly run into lots of little frustrations. For each one, I'd look up potential solutions online, and if I could find a solution which was intelligible to me given my level of understanding of vim at the time, I'd use it.

Eventually, some of those solutions involved using plugins.

After a few months, I found myself culling plugins that I'd installed as I learned better solutions that either weren't intelligible to me earlier or were just too overwhelming. For instance, NERDTree is an early plugin I used, but I eventually reached a point where I never touched it, so I removed it.

Re: Vim for Humans

#65

the only thing you need to know about vim, "kill -9 `pidof vim`" Seriously, why bother with this esoteric and cryptic software when something like Atom,SublimeText and VSCode exist...

I once thought the same thing. Then I started working with in the terminal environment on a regular basis. It forced me to learn vim as an IDE. I'm surprised to say that once I got in a groove with it I find regular text editors painfully slow in comparison. I employ vim bindings to intellij my Web browser and anywhere else possible. I challenge you to watch this video, spend a few days trying it out and report back to this comment https://youtu.be/5r6yzFEXajQ

Re: Vim for Humans

#66

Earlier quoted context omitted.

As someone who only uses Vim casually, what's an example of a bad default? For someone who is new to Vim, they wouldn't know if the controls are bad, or tough to learn e.g. using jkl; instead of arrow keys.

> As someone who only uses Vim casually, what's an example of a bad default? By default, vim doesn't enable filetype detection or syntax highlighting, so even though it can easily recognize a source file's language, it doesn't.

Anecdotally, this is exactly the sort of thing I have never needed while using vim on a server. Just let me modify content in the word hole...

Re: Vim for Humans

#67

I wish I could use vim or emacs. I don't know if I'm stupid or something but all of the key bindings, everything you have to remember, it just doesn't make sense to me. I wish there was something like nano + plugins. If I had that I could implement most of what I need (other then auto-completion for a crap load of languages).

I spent the last 2 hours of every work day using VIM, regardless of how much longer it took to work on things. By the end of the week, I could jump into vim after lunch. When I started using ':x' in TextMate I knew it was time to leave.

Re: Vim for Humans

#68
It took me a while to realize what really vim is for. What led me to realization was switching to Emacs. I read this post, and second checkbox says "modern customizable IDE". And I stopped there. Why you may ask? Well, I used Vim for 3 years before trying Emacs this spring. And I loaded it with all the heavy plugins(YCM), but Emacs led me to realization that Vim is more of an editor than IDE. Even with plugins I think it just doesn't even come close to Emacs, which has really nice ecosystem and plugins that are spot-on IDE feeling (ENSIME, CIDER, Alchemist etc). When I configured Vim again few days ago I realized how I misused Vim. My init.vim had about 150 lines of code, with few plugins, and now it felt right. Just like it felt right to customize the living hell out of Emacs. Again, this might be just my perception of things, some other people like it the other way, different flavors for different people, but it is how it felt right for me personally, after trying to understand philosophies and surroundings in which these wonderful pieces of software were made.

Re: Vim for Humans

#69
post #45

Earlier quoted context omitted.

Copy over one file (.vimrc) and you're done. If you use plugins, then copy them over with git or whatever. And my setup is very conservative so it's mild annoyance at worst. The defaults are just bad, I recommend using vim-sensible or doing your own lean and mean vim config.

As someone who only uses Vim casually, what's an example of a bad default? For someone who is new to Vim, they wouldn't know if the controls are bad, or tough to learn e.g. using jkl; instead of arrow keys.

Vim used to have very very conservative defaults, but it was fixed in Vim 8. Some very useful features like persistent undo are still not enabled by default.

Re: Vim for Humans

#70

I wish I could use vim or emacs. I don't know if I'm stupid or something but all of the key bindings, everything you have to remember, it just doesn't make sense to me. I wish there was something like nano + plugins. If I had that I could implement most of what I need (other then auto-completion for a crap load of languages).

> it just doesn't make sense to me. Here's how to think of Vim that will make sense. Suppose you have two identical codebases that each need to have the same 200 lines changed. Functions need to be added, comments to be removed, templates need modifying, and so forth. In one of the two codebases, you use Nano to apply those changes. In the second codebase, you use Vim. Assuming the Vim user was proficient at Vim, you…

I hear you for nano, but what about compared to [graphical mouse-clicky editor of choice] (in non-vim mode)? I know enough of the basic vim commands that I could edit a file if I ever needed to but how much hand effort could it save me vs. kate or VS Code? (though i really prefer notepad++ to both of those) I feel relatively efficient in a good graphical editor but maybe I just don't know any better? Really just give me reasonable multi-selection features and I'm happy.
Post reply on HN