Live data from Hacker News

Vim After 11 Years

statico.github.com

71–80 of 254 posts

Re: Vim After 11 Years

#71
post #64

Earlier quoted context omitted.

Why for?

Here are few things how I use it: - scrolling with a mouse wheel - selecting/resizing a split window - jumping to a specific place in the code - making a selection

All of that can be done much more efficiently without the mouse:

- scrolling with a mouse wheel

    :h scroll.txt
- selecting/resizing a split window

    :h window-resize
    :h window-move-cursor
- jumping to a specific place in the code

    /foo 
or the myriad of cool things in

    :h motion.txt
- making a selection

    v{motion}

Re: Vim After 11 Years

#72

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…

It sounds like you want vim features. But vi compatibility mode is probably not consistent with these. Mapping f-keys should work fine in a GUI vim, but in a terminal F-keys may depend on configuring the terminal. You don't have to use syntastic if it doesn't work right for you, you can just use individual checker plugins or set makeprg and use :make. Mapping auto-complete to tab depends on not having multiple plugin…

Right, I want some of the vim features, mainly plugins. I don't enable vi compatibility, it isn't even remotely vi compatible and it just breaks stuff. I want syntastic, that's the primary motivation for trying to get vim working. I just want it to be helpful instead of irritating. No plugins are messing with tab, I am just trying to get it to work using a normal mapping.

Re: Vim After 11 Years

#73
post #46

Earlier quoted context omitted.

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.

As in Ctrl-z to background, and Ctrl-Z to fg back into vim from the shell?

I'm sure they mean `map fg ` in Vim so that `fg` from Vim lines up with `fg` from shell and you can repeat the same stroke to easily "toggle" Vim.

Re: Vim After 11 Years

#74
post #19
post #9

Why do people keep suggesting iTerm2? The built-in terminal app on the Mac does Unicode and 256 colors just fine.

I personally enjoy being able to split panes vertically with iTerm2

Indeed. iTerm2 has replaced tmux for me for local development.

Re: Vim After 11 Years

#76
post #58
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.

I've had ; mapped to : forever. Is there a use for `;` I'm missing out on? `;` just seems to be for stuff like "`fp` -- Oh wait, I didn't see all the p's between my cursor and the p I wanted. ; ; ; ;." Now I use easymotion.vim which obviates that scenario.

I created vim-seek exactly for this reason, it's like f but takes always two characters, way faster than easymotion within the line (though I still use easymotion for longer distances) http://github.com/goldfeld/vim-seek

Re: Vim After 11 Years

#78
post #42

I'm not sure why the author advocates job control (ie ctrl-z/fg/bg) instead of using tmux/screen. A multiplexer offers far more flexibility, and most importantly does not lose state even if your session ends (eg ssh connection drops).

nohup master race.

Just kidding, tmux for life.

Re: Vim After 11 Years

#79
post #9

Why do people keep suggesting iTerm2? The built-in terminal app on the Mac does Unicode and 256 colors just fine.

The "step back in time" feature is sort of gimmicky, but does mean you can rewind even Curses terminal applications. Rarely actually useful, but it has saved me a huge amount of hassle a few times.

Re: Vim After 11 Years

#80
My single greatest tip to make vim even more amazing is to run it in a tmux session: It makes it super easy to split panes and create new windows for related things you need to do (git stuff, compilation, running tests, running a REPL, etc.)
Post reply on HN