News for hackers. Stuff that matters.
Re:My Biggest Vim Productivity Boost by djacobs on Monday May 20, 2013 @11:50PM (#5741803)
It's always good to share Vim tips, so thanks for that.

Question, though -- why not use the native <C-i> and <C-o> to navigate between jump points? It will get you to the previous and next buffers but has just enough granularity to be useful for other things, too. (<C-6> is native buffer toggling and ignores jump points, but it's not easy to type.)

Re:My Biggest Vim Productivity Boost by olalonde on Tuesday May 21, 2013 @03:02AM (#5742262)
I wasn't aware of jump point, I will look it up thanks.
Re:My Biggest Vim Productivity Boost by daGrevis on Tuesday May 21, 2013 @03:33AM (#5742341)
This is what I have for controlling tabs:

    " Mappings for controlling tabs.
    noremap <M-a> :tabprevious<CR>
    noremap <M-s> :tabnext<CR>
    noremap <M-1> :tabnext 1<CR>
    noremap <M-2> :tabnext 2<CR>
    noremap <M-3> :tabnext 3<CR>
    noremap <M-4> :tabnext 4<CR>
    noremap <M-5> :tabnext 5<CR>
    noremap <M-6> :tabnext 6<CR>
    noremap <M-7> :tabnext 7<CR>
    noremap <M-8> :tabnext 8<CR>
    noremap <M-9> :tabnext 9<CR>
More here: https://github.com/daGrevis/Dotfiles/blob/master/.vimrc .
Re:My Biggest Vim Productivity Boost by amiorin on Tuesday May 21, 2013 @04:19AM (#5742442)
Re:My Biggest Vim Productivity Boost by lake99 on Monday May 20, 2013 @11:57PM (#5741828)
Quite odd that in the last two polls on editors, it turned out that HN has about half as many emacs users as vim users. And still, we have this disproportionate barrage of vim tips, vim tricks, vim productivity boosts, and what not.

Isn't there some vim mailing list you could subscribe to?

Re:My Biggest Vim Productivity Boost by qu4z-2 on Tuesday May 21, 2013 @02:03AM (#5742120)
Seriously, though. If there's a vim-tricks mailing list, do tell me. I'd subscribe :)

(and then probably go all grumpy when people don't use vim the "right" way)

Re:My Biggest Vim Productivity Boost by lake99 on Tuesday May 21, 2013 @08:02AM (#5743042)
I looked at http://www.vim.org/maillist.php and came across https://groups.google.com/forum/?fromgroups#!forum/vim_use. I came across plenty of tips there, but that's mostly in QA form. If you want to read just tips, try http://vim.wikia.com/wiki/Vim_Tips_Wiki.
Re:My Biggest Vim Productivity Boost by taproot on Tuesday May 21, 2013 @02:48AM (#5742230)
Q: How do you tell a vim user from an emacs user?

A: You don't, they tell you.

Re:My Biggest Vim Productivity Boost by baconhigh on Tuesday May 21, 2013 @12:31AM (#5741915)
Isn't there some troll list you could subscribe to?
Re:My Biggest Vim Productivity Boost by siddboots on Tuesday May 21, 2013 @02:04AM (#5742121)
I've only ever used window splits (<C-w> | _ = etc) and have never even tried to get used to tabs or non-visible buffers. Can anyone tell me whether there would be much benefit to changing my workflow?
Re:My Biggest Vim Productivity Boost by amiorin on Tuesday May 21, 2013 @04:17AM (#5742440)
I was like you. I thought that tabs were useless. Now I use tabs. The workflow is to open 3 or 4 tabs, not more. For example, first tab rails app, second tab a gem used by the app, third tab my vimrc (I need to tweak constantly), fourth tab my todo list. Here you find my comment about it with a screenshot http://syskall.com/my-biggest-vim-productivity-boost/#commen...
Re:My Biggest Vim Productivity Boost by siddboots on Tuesday May 21, 2013 @05:29AM (#5742637)
I like the look of that set up. Tabs allow you to keep buffers open at a lower mental priority, right?

I think I'll try switching to "one tab per project", but stick with splits for individual files within a project.

Re:My Biggest Vim Productivity Boost by rlpb on Tuesday May 21, 2013 @08:01AM (#5743039)
My own biggest vim productivity boost: :set rnu

This enables relative line numbering, meaning that moving between lines suddenly gets much quicker. For example: I can type 18j and not miss.

Re:My Biggest Vim Productivity Boost by walrus on Tuesday May 21, 2013 @12:19AM (#5741884)
For switching tabs, there's also gt and gT. For buffers, I normally switch with :b or :e, since I often end up with too many buffers for next/previous to be practical.
Re:My Biggest Vim Productivity Boost by rhapsodyv on Tuesday May 21, 2013 @08:43AM (#5743211)
I use tab with shift arrow to navigate:

  map ,t :tabnew 
  map gf <C-W>gf
  map <S-Right> gt
  map <S-Left> gT
Re:My Biggest Vim Productivity Boost by vdm on Tuesday May 21, 2013 @05:24AM (#5742617)
Re:My Biggest Vim Productivity Boost by netpenthe on Tuesday May 21, 2013 @12:39AM (#5741941)
i use screen to have multiple tabs.. i used to use vim tabs, but found screen tabs better..

not really sure why.. (i have my screen tabbing with F11 and F12).

Re:My Biggest Vim Productivity Boost by zxter on Tuesday May 21, 2013 @03:10AM (#5742282)
but then you can't yank and paste between buffers since you will be using seperate vims.

you can try dwm.vim (https://github.com/spolu/dwm.vim) if you have spare keybindings.

if you are still not convinced and want to use screen, i recommend tmux since you can split both horizontal and vertical.