Live data from Hacker News

Vim After 11 Years

statico.github.com

211–220 of 254 posts

Re: Vim After 11 Years

#211
post #96

> With a modern, 256-color terminal like iTerm2 or Gnome Terminal, it will even look like gVim Uh, I use xterm... It's obsolete, I know, but it's still the fastest.

Also, Terminology. Faster than xterm or rxvt.

Re: Vim After 11 Years

#212
post #83
post #81

Earlier quoted context omitted.

You can easily split panes (called windows in vim) within vim. You can also create new tabs within vim for related things you need to do. I still use tmux or screen to do other things which aren't convenient or elegant to do within vim, but splitting windows and creating tabs can be done just fine within vim itself (or, in my case, within gvim, which I prefer due to the increased color gamut and keybinding abilities…

When I said split panes in tmux, I meant to put shells, repls, or servers. I also use split panes and tabs within vim for extra buffers.

you should take a look at https://github.com/jpalardy/vim-slime , very handy for sending code from vim sessions to other tmux panes

Re: Vim After 11 Years

#213
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…

Good luck beaming your vim registers from a remote vim into the local clipboard.

Re: Vim After 11 Years

#214
post #88

Some small vim tweaks I've recently been using myself that I find very nice: nmap :write cabbrev w nope Re-map enter to save the file. If you try to do a :w it will yell at you until you take out the cabbrev so you can retrain your muscle memory. Took me about a day to retrain. let g:EasyMotion_leader_key = ';' nmap s ;w nmap S ;b Remap s and S to be easymotion forward and backward. I never use s, since it's largely…

YouCompleteMe claims to work with omnifunc-based completion engine, but I couldn't get that to work. Can't tell if it's YCM or foreplay that's dropping the ball, but they don't seem to work together (i.e. I get foreplay completions when I trigger omni completion, but not dynamically via YCM).

EDIT: disregard me, it was a stupid configuration error (both plugins mapped the same key for completion, and foreplay won)

Re: Vim After 11 Years

#215

Can vim do the following? I'm editing some project with 10000 C++ files. There is some C++ file I currently don't have open, say "palette.cpp" which is in a subdirectory "project/graphics/algorithms/color/". Now I want to open palette.cpp without ever having to type, not even with tab autocompletion, that path. IntelliJ (which I do use for C++ ;)) can do this easily: just press CTRL+R, then palette.cpp, ENTER, and th…

> Some IDE's and editors have this feature where if you change lines, it marks it with some color on the left, as well as colors in the scrollbar, to immediately see which parts of the file were changed compared to git and/or the last time you opened it.

This does that: https://github.com/airblade/vim-gitgutter

Re: Vim After 11 Years

#216

Am I the only who tries not to override default commands? It's not like I use them all, but I might learn it at some point, and I want to have them available.

As a rule of thumb you are right, but in the particular case of s, S I think it's OK. They are pretty darn redundant.

Re: Vim After 11 Years

#217

My favourite ones: " Make Y behave like other capitals nnoremap Y y$ " Reselect visual block after indent/outdent vnoremap vnoremap > >gv

Curious - what's the point of retaining the selection after indenting?

Re: Vim After 11 Years

#219
post #9

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

Am I the only one who doesn't like iTerm 2 because it feels slow to use? Example: Open up a file in vim, then scroll up and down quickly. The refresh on iTerm 2 is noticeably sluggish compared to Terminal.app.

Re: Vim After 11 Years

#220
post #33

Earlier quoted context omitted.

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?

That can happen when the dev environment is too complex / heavy to setup on a local machine.
Post reply on HN