Live data from Hacker News

Vim After 11 Years

statico.github.com

231–240 of 254 posts

Re: Vim After 11 Years

#231
post #20

Earlier quoted context omitted.

iterm2 supports mouse input, terminal.app does not.

iterm2 does not let me go forward/backward by word (with the option key). anyone know how to fix this?

This can be fixed by editing the keybindings for your shell. Bash by default on OS X? If so Google for ".inputrc", mine looks like this:

  # See http://www.reddit.com/r/commandline/comments/kbeoe/you_can_make_readline_and_bash_much_more_user/
  "\eOd": backward-word
  "\e[5D": backward-word  # for OS X
  "\eOc": forward-word
  "\e[5C": forward-word   # for OS X
  "\C-f": reverse-search-history
  "\C-F": reverse-search-history  # for OS X
  #Control-F: reverse-search-history
  #Control-j: menu-complete
  #Control-k: menu-complete-backward
  set bell-style none
  set completion-ignore-case on
  set completion-prefix-display-length 2
  set show-all-if-ambiguous on
  set show-all-if-unmodified on

Re: Vim After 11 Years

#232
post #222

Earlier quoted context omitted.

No. I know what the difference is between the two. And I know that I never use mouse in one or the other. I don't use it for scrolling, I don't use it for pointing and clicking, I don't use for selecting stuff… REPL? no use for the mouse. htop? no use for the mouse. git/svn/hg? no use for the mouse.

How do you select text then? I'm sure there are ways, but they are certainly not intuitive and I've never bothered to look them up since I don't do this task as often.

Do you mean "select text from whatever is displayed in the terminal" or "select text in Vim"?

I never select or copy anything from the terminal: pbcopy on the Mac OS X and xclip on Linux are what I use to get stuff from the shell into the system clipboard.

I don't think that's what you ask, but in Vim, visual selection is done by hitting v (character-wise), V (line-wise) and Ctrl-v (block-wise) followed by a motion or a text-object: va{, vit and so on.

Re: Vim After 11 Years

#233
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

No, if I remember correctly it was somewhere on http://emacswiki.org which is a great resource by the way.

Re: Vim After 11 Years

#235
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.

Nope, I've done it quite a few times--you can bootstrap it from your vimrc like so:

  if !isdirectory(expand(root, 1).'/vundle')
    exec '!git clone '.src.' '.shellescape(root, 1).'/vundle'
  endif

Re: Vim After 11 Years

#236

Earlier quoted context omitted.

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

Nope, I've done it quite a few times--you can bootstrap it from your vimrc like so: if !isdirectory(expand(root, 1).'/vundle') exec '!git clone '.src.' '.shellescape(root, 1).'/vundle' endif

Thanks.

Re: Vim After 11 Years

#238
post #143

Earlier quoted context omitted.

I use \ for , doesn't seem to clash with anything I do on a regular basis (but I'm not a power user by any means)

It doesn't clash with anything at all, as it is the default .

Ah, I had no idea. I saw it explicitly defined in someone's vimrc and thought, hey that's a good key to use.

Re: Vim After 11 Years

#239
post #198

Earlier quoted context omitted.

o does that. :h netrw-browse-maps

Almost, but not quite. o opens a new window with the selected file, while nerdtree opens the file in the most recently used non-nerdtree window. Also, there doesn't seem to be a way to tell netrw to create a vertical split rather than a horizontal split, which is inconvenient on modern wide screen monitors.

Did you actually read :h netrw before giving up?

    P
opens the file in the most recent non netrw window.

    v
opens the file in a vertical split and

    :Vex
opens netw in a vertical split.

Re: Vim After 11 Years

#240

I use nvi, and have tried to switch to vim a dozen or so times over the years. But there are so many irritating little quirks and misfeatures and annoyances that I can never manage to fix. Does anyone know of a guide to getting a sane, non-broken vim working with some basic plugins like syntastic? Last time I tried I couldn't bind F-keys for some reason, I couldn't get syntastic's error marking column to stay on inst…

>> I couldn't get syntastic's error marking column to stay on instead of shifting my text back and forth all the time

Try this:

    augroup syn_gutter
        au BufWinEnter * sign define mysign
        au BufWinEnter * exe "sign place 1337 line=1 name=mysign buffer=" . bufnr('%')
    augroup END
Bonus fancy character bling: let g:syntastic_error_symbol='✗' let g:syntastic_warning_symbol='⚠'
Post reply on HN