Live data from Hacker News

Tmux and Vim – better together

blog.bugsnag.com

251–260 of 297 posts

Re: Tmux and Vim – better together

#251
post #240

Earlier quoted context omitted.

Here is the key value provided by an IDE: * Autocomplete. This deserves way more recognition than it gets. Having function signatures, documentation, overloads, types, available IN-LINE while you type saves so much work from programming and is essential to delivering correct code. If you want to be an effective programmer, this is a fundamental tool. * Debugger. Easy breakpoints, conditional breakpoints, built-in pro…

> * Autocomplete. This deserves way more recognition than it gets. Having function signatures, documentation, overloads, types, available IN-LINE while you type saves so much work from programming and is essential to delivering correct code. If you want to be an effective programmer, this is a fundamental tool. Coding. This deserves way more recognition than it gets. Having function signatures, documentation, overloa…

Autocomplete is obnoxious. I write Ruby primarily and if you need autocomplete for Ruby, you're probably doing it wrong.

Re: Tmux and Vim – better together

#252

Earlier quoted context omitted.

I used to run more commands from vim, but now I personally find Ctrl-Z is usually more convenient for all the one-off commands. If I do run stuff from inside of vim, it's now usually ":w !" or ":r !" (or some custom command wrapper around those).

Oh! Ctrl-Z! I've been calling !zsh all these years, for quick shell access, and never thought of suspending vim. Thanks for the nugget.

Put this in your zshrc, and Ctrl-Z will also resume the most recently suspended process. Really handy to just Ctrl-Z in and out of Vim.

  # Make Ctrl-z also resume background process
  fancy-ctrl-z () {
      if [[ $#BUFFER -eq 0 ]]; then
          BUFFER="fg"
          zle accept-line
      else
          zleush-input
          zle clear-screen
      fi
  }
  zle -N fancy-ctrl-z
  bindkey '^Z' fancy-ctrl-z

Re: Tmux and Vim – better together

#253
post #173

Earlier quoted context omitted.

If you really want I'm sure we could list out plenty of "serious programmers" that use vim.

Their existence doesn't surprise me, but they deserve less respect for making foolish choices. An idiot savant is still an idiot. I'll welcome any points made for VIM that acknowledge the immense value provided by IDEs, but if I had already seen such points I wouldn't even be posting here today. Every argument I've seen for VIM systematically denies: * That programming is hard work. * That making life easier is a goo…

You know why I don't like IDEs (especially bloated crap like RubyMine?) Because they're reasource hogs. They run slower. Vim + Tmux is as fast as you can think.

Re: Tmux and Vim – better together

#254
post #187

I've found my flow with vim+i3+ranger i3 is a window manager that can outcompete anything you can do with vim splits or a tool like tmux/screen. It's whole existence is based around putting windows in the right place at the right time. Ranger is a vim-like ncurses file browser. I think it's genuinely one of the most underappreciated tools in programming. The ability to hjkl through your file system, with quick marks,…

How is i3 for a general purpose desktop? For coding it sounds great, but the same machine is used when I'm browsing the web or playing games or whatever.

Re: Tmux and Vim – better together

#255
post #17

I use vim 7.4 and it segfaults atleast four-five times everyday. I suspect it's some plugin that is causing it to crash but I don't really know. Does it happen to anyone else too? I have mapped Ctrl-C to ESC and I use it often. One specific instance I have seen vim crash is when the cursor is at np.inf and I press Ctrl-C.

Have you tried upgrading to a non-ancient vim?

It's 6 months old at most. Their distro probably doesn't even have vim 8 yet, ubuntu 16.10 doesn't.

Re: Tmux and Vim – better together

#256

Earlier quoted context omitted.

I think that's a little harsh. What a lot of people (including myself) dislike about IDEs is that you lose a lot of tool composability, and to some extent you have to play by the IDE's rules. With a Vim + CLI setup, you get to define the optimal flow, but the tradeoff is maintainability. For many, though, once you get your environment set up, it feels amazingly natural, more than an IDE could provide. It's more a mat…

Here is the key value provided by an IDE: * Autocomplete. This deserves way more recognition than it gets. Having function signatures, documentation, overloads, types, available IN-LINE while you type saves so much work from programming and is essential to delivering correct code. If you want to be an effective programmer, this is a fundamental tool. * Debugger. Easy breakpoints, conditional breakpoints, built-in pro…

For a debugger I usually run gdb in a terminal it initially had a pretty steep learning curve but I find it to be extremely powerful I mostly use it for analyzing core dumps rather than stepping through breakpoints. Being able to backtrace and step through stack frame by frame is really, really useful.

Re: Tmux and Vim – better together

#257
Lots of good advice, Vimux was the killer for me I think. I have a common workflow of edit -> run -> edit and that will make that workflow seamless.

I also tried out vim-arpeggio but kept seeing "Arpeggio is not defined". Looks like the project hasn't been updated for a while.

Re: Tmux and Vim – better together

#258
post #254
post #187

I've found my flow with vim+i3+ranger i3 is a window manager that can outcompete anything you can do with vim splits or a tool like tmux/screen. It's whole existence is based around putting windows in the right place at the right time. Ranger is a vim-like ncurses file browser. I think it's genuinely one of the most underappreciated tools in programming. The ability to hjkl through your file system, with quick marks,…

How is i3 for a general purpose desktop? For coding it sounds great, but the same machine is used when I'm browsing the web or playing games or whatever.

I've been using awesomewm for a few years now, and while it's not i3 I believe it's close enough that I can answer that: A tiling wm is very viable for a general purpose desktop. It's also extra useful if you have a multi-monitor setup.

Applications that works in fullscreen (mpv, vlc, video games) requires you to set them fullscreen/floating, either yourself with a keybinding (Mod+f on awesome) or through the wm's config file. Some applications do not like tiling at all, some java gui apps from what I remember, but there are so few of them that I can't actually give you any example.

I say give it a shot, but beware: controlling your desktop entirely from your keyboard is addictive.

Re: Tmux and Vim – better together

#259
post #30

All this looks really great, however I think I just can't deal with the effort of maintaining these complex editor configurations anymore. I've been a multi-decade Vim user, until I switched to VSCode last year. It made me realize how much better the user experience can be for an editor. I had all kinds of complex vim configurations and plugins with special cases for linux vs. mac, server vs. desktop, GUI vs. termina…

> If there was one thing I could ask of Vim (or even emacs), it'd be a consistent high-quality default user experience.

FWIW I find both Prelude (https://github.com/bbatsov/prelude) and Spacemacs (http://spacemacs.org/) to offer pretty out-of-the-box experiences.

Re: Tmux and Vim – better together

#260
post #155
post #107

Earlier quoted context omitted.

Pretty much everyone knows the price of admission to using tools like Vim and Emacs is the time investment in config and learning the quirks. What the OP is saying that this doesn't have to be a perpetual state. Once you invest effort early on getting it right you often don't need to touch it, beyond a few tweaks now and then. The maintenance burden definitely declines over time. Then all you need is a storage soluti…

Honestly, I learned to code with vim, and it never struck me as particularly complicated. The commands follow a pretty consistent logic... the defaults aren't great but it took me one google search to find out what a vimrc file is. emacs on the other hand, even as an experienced programmer, I found near unusable in its default and after a week of frustration with all the inconsistencies and oddities gave up on it. Wh…

You're right that emacs without any config is annoying. Check out Prelude (https://github.com/bbatsov/prelude); it's a really nice set of defaults for emacs.

I think emacs is the modern editor in its own spirit: none of the imitations come close.

Post reply on HN