Live data from Hacker News

Vim After 11 Years

statico.github.com

201–210 of 254 posts

Re: Vim After 11 Years

#201
post #98

I recently switched to Vundle from Pathogen and it is a joy to use. Best part: you can bootstrap[1] Vundle from your .vimrc, turning the two-part "vimrc & plugins" configuration into a one-part "vimrc" configuration. https://github.com/gmarik/vundle/blob/master/test/vimrc

No you can't, you still need to have vundle installed.

Re: Vim After 11 Years

#202
post #146
post #40

Lots of people seem to declare ; or , to be useless keys and remap them. They're two of my most used movement keys in certain circumstances. I used to have , remapped to but switched back when I realised what I was missing out on. I'd advise anybody else to reconsider if they've made the same mistake I did.

Usually I use a method that I found on some Emacs-related website. It said to use text search for navigating around the file. That's why I use / pretty often. I use f, t, and related movements as arguments to actions.

Maybe this page: https://sites.google.com/site/steveyegge2/effective-emacs

Re: Vim After 11 Years

#203

Earlier quoted context omitted.

> All of that can be done much more efficiently without the mouse No. All this can be made with an extra cognitive overload provided by the use of keyboard shortcuts that makes you think you're doing something useful and/or faster than with the mouse. Especially if you don't need to have your hand at the keyboard at all times (i.e you're just browsing code and not writing), scrolling with the mouse is way faster.

Keyboard shortcuts give me precision and efficiency, not speed, and that cognitive overload you talk about is a small price to pay.

For you. But you don't get to make that decision for everyone else. Stop trying to impose your value system on others. It's clear you don't like using a mouse. Then don't. Keep using a 1970s keyboard if it suits you. Bon a petite.

Re: Vim After 11 Years

#204
I'm disappointed no one's mentioned digraphs yet. I've used emacs for years, but I'm starting to use vim now because ctrl-k G* etc is just so easy (I type a lot of math).

Re: Vim After 11 Years

#205
post #202
post #146

Earlier quoted context omitted.

Usually I use a method that I found on some Emacs-related website. It said to use text search for navigating around the file. That's why I use / pretty often. I use f, t, and related movements as arguments to actions.

Maybe this page: https://sites.google.com/site/steveyegge2/effective-emacs

I love using search interactive to navigate text. But however, getting the point to the right spot after that still feels cumbersome, in particular, moving to the beginning of the matched word doesn't seem easy.

Re: Vim After 11 Years

#206

One of Vim’s strengths is that it starts lightning fast, so starting Vim from the terminal is trivial. With a modern, 256-color terminal like iTerm2 or Gnome Terminal, it will even look like gVim. But the best part is that you can drop into the command line at any time with Ctrl-Z, which suspends Vim, and your working directory is where you left off. Is there any reason to do this instead of !sh within Vim to drop in…

have your terminal map Ctrl-Z to fg, and you can cycle in and out of the shell almost instantly from vim with that key.

How can you do that? For me, this just doesn't work...

  bind '"\C-z":"fg\n"'
  bind -x '"\C-z":"fg"'
  echo 'Control-z: "fg\n"' >> ~/.inputrc
If I replace "z" with "a", it works.

C-z works otherwise, e.g. C-v C-z prints ^Z in shell, and C-z suspends programs (e.g. vim). Is it a bash thing or a terminal thing (I'm using iTerm2)?

Re: Vim After 11 Years

#207
post #40

Lots of people seem to declare ; or , to be useless keys and remap them. They're two of my most used movement keys in certain circumstances. I used to have , remapped to but switched back when I realised what I was missing out on. I'd advise anybody else to reconsider if they've made the same mistake I did.

What is the default behavior for ","?

It's ";" in reverse, i.e repeat the latest f,F,t or T backwards.

Re: Vim After 11 Years

#208
post #33
post #24

Every time I read an article like this, it's how a power user installs an array of plugins and customizations to really soup up Vim, which to me kind of misses the point. If you want that level whiz-bang, use Coda or Sublime Text 2 or Eclipse or whatever. I don't recall where I saw this, but someone advised disabling syntax coloring in your editor to remove a crutch (and, secondarily, to visually simplify your enviro…

A lot of us do development on remote servers. Using vim in a terminal on the server is a heck of a lot snappier than a local editor over a remote connection. Also makes reconnecting your dev environment as easy as tmux a -d and allows me to do so from multiple machines.

It is 2013, why are you doing "development" on a remote server? Is remote debugging now not a thing?

Re: Vim After 11 Years

#209
post #180

Earlier quoted context omitted.

There is no "better", young padawan.

Yes, there is. "Best" is a harder subject to tackle, but there's always "better". di{ is obviously both quicker and more precise than reaching to the mouse, pointing at the beginning of the code block, extending the selection until the end of the code block and hitting backspace. One may think these keybindings are awkward or hard to remember (I did, at first, they are not) but they are both faster, more efficient an…

It's a subjective experience. I, too, prefer to use the keyboard as much as possible but I've also encountered doofuses that mock that position because the mouse is "so convenient" and "there's no way it's faster to use the keyboard entirely". So I guess their better is different from my better.
Post reply on HN