News for hackers. Stuff that matters.
Re:Poll: Which is your primary text editor? by abelardx on Monday May 20, 2013 @08:15AM (#5737190)
For the pure editing of text, Vim is the clear winner. Whether that's all you want, is another question.
Re:Poll: Which is your primary text editor? by swah on Monday May 20, 2013 @08:18AM (#5737202)
If only working with multiple files was easier... what are you guys using these days ?

[edit]

Also, one thing that shows how Vim is oriented towards opening and closing it all time is that preventing acidental quitting is quite hard to achieve (only with hacks..)

Re:Poll: Which is your primary text editor? by wting on Monday May 20, 2013 @08:55AM (#5737417)
I've aliased vim -> "vim -p" which opens files into multiple tabs when passed as arguments.

I've rebound the arrow keys to switch and move tabs and buffers.

* up/down: previous/next buffer

* left/right: previous/next tab

* shift left/right: move tab to left or right

    inoremap <Up> <esc>:bprev<cr>
    inoremap <Down> <esc>:bnext<cr>
    inoremap <Left> <esc>:tabprev<cr>
    inoremap <Right> <esc>:tabnext<cr>
    noremap <Up> :bprev<cr>
    noremap <Down> :bnext<cr>
    noremap <Left> :tabprev<cr>
    noremap <Right> :tabnext<cr>
    nnoremap <silent> <S-Left> :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
    nnoremap <silent> <S-Right> :execute 'silent! tabmove ' . tabpagenr()<CR>
As for working with multiple files easier when vim's already open, it's a combination of Command-T, Buffer Explorer, and NERD tree.
Re:Poll: Which is your primary text editor? by micampe on Monday May 20, 2013 @09:36AM (#5737624)
The only vim plugin I use: http://www.vim.org/scripts/script.php?script_id=1664

With a few mappings:

    noremap <leader>b :ls<cr>:buffer 
    noremap <C-a> :b#<cr>
    noremap <C-h> :bprev<cr>
    noremap <C-l> :bnext<cr>
Re:Poll: Which is your primary text editor? by z92 on Monday May 20, 2013 @08:29AM (#5737274)
:bn [buffer next] :bp [buffer previous]

:bn is mapped to backslash on my installation.

:b <tab> for a list of all open files where you can pick the one you want to switch to. Mapped to ",." on my machine.

vim might have its problems. But buffer switching isn't one, for me.

Re:Poll: Which is your primary text editor? by swah on Monday May 20, 2013 @08:39AM (#5737327)
How could anyone use :bn and :bp? Its 4 keypresses!! :) Contrast with ctrl-tab.
Re:Poll: Which is your primary text editor? by johncoltrane on Monday May 20, 2013 @04:12PM (#5739754)
What do you call "accidental quitting"?
Re:Poll: Which is your primary text editor? by swah on Tuesday May 21, 2013 @01:06PM (#5745049)
If you have two windows, :q closes the current window, and most people do that all the time, for removing buffers from the view. But if you only have one window and run that, with the intention of dumping the buffer or simply by mistake, your Vim is closed...
Re:Poll: Which is your primary text editor? by stray on Monday May 20, 2013 @08:27AM (#5737258)
You misspelled "emacs".
Re:Poll: Which is your primary text editor? by abelardx on Monday May 20, 2013 @09:28AM (#5737577)
I like both, but Vim's modal nature and the consequently far fewer control combinations make it much faster for editing text. On the other hand, emacs' language-specific modes and built-in repl-in-the-editor support is awesome.