Live data from Hacker News

Vim: Takeaways from One Year of Typing

sankho.github.io

51–60 of 98 posts

Re: Vim: Takeaways from One Year of Typing

#51
Here's the thing: when you're coding, how much time is spent on reading vs writing? For me it's probably 90/10. Since most my time is spent concentrating on understanding code, the last thing I want is an editor that forces me to consciously think about text operations. "d[downkey]4" might be theoretically more efficient, but I spend way less cognitive energy holding down the shift key and pressing the down arrow 4 times.

The other thing is efficient navigation within one file isn't super useful to me. I spend most my time doing find-in-files or jump-to-definition or rename-across-this-project. Vim kind of sucks for all those use cases. There are plugins of course, but that just brings it up to par with popular IDE's, except with a clunkier interface.

I say this as a person that knows vim well. If I'm SSH'd into a server and I need to edit a config file, vim is the first thing I'll reach for, but for coding, I'm pretty much only using it if I'm using a language that doesn't have a nice IDE already.

Re: Vim: Takeaways from One Year of Typing

#52

vim overhyped as an editor? It might be overhyped as a programming tool (you won't write 2x the same amount of lines in a day; you will not be 5x more productive), but as an editor, it deserves every single bit of hype that it has. No other editor stands next to vim. A lot of people dislike editors. It's fine. There are a million tools out there that help people become more productive programmers. You might enjoy Int…

> No other editor stands next to vim

And no other operating system stands next to emacs.

Re: Vim: Takeaways from One Year of Typing

#53

Does anyone know if Vim has the power of multi line editing / multiple cursors like w/ Sublime Text? The large majority of my productivity involved copying and pasting with multi line select, and jumping words and different boundaries on multiple lines at once. Anything that matches ST for Vim?

An another alternative to the vim plugins, here's a vim-like text editor that concentrates on selections and multiple cursors: https://github.com/mawww/kakoune

Re: Vim: Takeaways from One Year of Typing

#54
post #32
post #21

I agree with everything here except the idea that you shouldn't start with MacVIM. The main issue with new users getting into modal editors is the learning curve. If you can reduce the upfront difficulty by accepting OS-specific hotkeys and mouse events, why not? Using VIM saves you time and a smart user will search out the ways the editor can help her, but there's no value in making the user go cold turkey.

The main problem I have with suggesting starting with MacVim is that using it doesn't translate well when you're SSH'd into another system running a different OS. I've been using Vim for a while (and now neovim) and recently tried out MacVim and it just didn't make any sense to me. The menus are totally non-intuitive if you're used to doing everything from the keyboard. Conversely, I wouldn't expect someone who start…

> The menus are totally non-intuitive if you're used to doing everything from the keyboard

You can disable the menus, and using MacVim doesn't require you to use the menus. I use Vim 100% with the keyboard, and I still use MacVim.

Re: Vim: Takeaways from One Year of Typing

#55
post #43

Earlier quoted context omitted.

Some thoughts: What you call tabs are what vim calls buffers. (EDIT vim has something called tabs as well but they do something else.) Completion press e.g. control-x (although I actually use a plugin here so I don't know how good vim's built in is). Visual selection add set mouse=a to the .vimrc Or using the "v" command

What he calls tabs are actually tabs: :tabe create tab :tabn next tab, :tabp previous tab, :tabm move tab. I have tabn/tabp bound to l and h for easy nav and t for create.

Tabs in vim are actually just views of buffers. Ie: a workspace more than an editing window.

Buffers are the proper solution to the mentioned comment.

Re: Vim: Takeaways from One Year of Typing

#56

vim overhyped as an editor? It might be overhyped as a programming tool (you won't write 2x the same amount of lines in a day; you will not be 5x more productive), but as an editor, it deserves every single bit of hype that it has. No other editor stands next to vim. A lot of people dislike editors. It's fine. There are a million tools out there that help people become more productive programmers. You might enjoy Int…

> No other editor stands next to vim And no other operating system stands next to emacs.

I knew someone would answer that. It was just a matter of time.

Re: Vim: Takeaways from One Year of Typing

#58

  No other text editor has as many developers working on
  plugins than VIM. Virtually anything that exists in
  another text editor which isn’t mouse driven has some 
  very popular, very supported, very documented plugin 
  you can use.
And the Vim equivalent of org mode is what again? I'm a Steve Litt fan, but Vim Outliner isn't even in the same league as org mode.

As a Vim user of many years I still believe it to be superior to emacs when it comes to editing text. That said, emacs is a vastly superior programming environment. And like many people I find org mode to be indispensible.

Happily, these things aren't either/or situations. I still use Vim for quick text editing tasks, but for other matters evil+org mode lets me have the best of both worlds.

Edit: typos

Re: Vim: Takeaways from One Year of Typing

#59

Does anyone know if Vim has the power of multi line editing / multiple cursors like w/ Sublime Text? The large majority of my productivity involved copying and pasting with multi line select, and jumping words and different boundaries on multiple lines at once. Anything that matches ST for Vim?

Vim does have the ability to insert text on multiple lines.

in visual block mode (CTRL-V or CTRL-Q), select a column of lines you would like to edit. Then, you can enter insert mode or paste and it will do the same thing on all the lines selected.

so to edit 4 lines at once it would be (CTRL-Q)3jI and then type in whatever i want and when I exit back to normal mode the text will appear on all 4 lines.

Re: Vim: Takeaways from One Year of Typing

#60
post #31

I've tried switching to VIM (from few years of using Sublime) few times already, but failed every single time: bare VIM is too dysfunctional to my taste and ways of working with text editor (missing tabs, file/folder treee view, easy switching documents, easy visual copy/paste and so on, missing code expanding/completion...). Last time I tried spf-vim[0] but while it looked 'cool' (it has colors, it does code complet…

I'm pretty sure the base install of vim has everything you're looking for, it just requires a little reading. One problem that vim does not have is a lack of documentation. My favorite uses of tabs is scripting a work space based on context. You can start vim with several tabs already open: vim -p file0 file1 file2
Post reply on HN