Hacker News new | past | comments | ask | show | jobs | submit login
My Biggest Vim Productivity Boost (syskall.com)
17 points by olalonde on May 21, 2013 | hide | past | favorite | 18 comments



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.)


I wasn't aware of jump point, I will look it up thanks.


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 .



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?


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)


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.


Q: How do you tell a vim user from an emacs user?

A: You don't, they tell you.


Isn't there some troll list you could subscribe to?


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?


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


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.


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.


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.


I use tab with shift arrow to navigate:

  map ,t :tabnew 
  map gf <C-W>gf
  map <S-Right> gt
  map <S-Left> gT



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).


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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: