5 ms·
For the pure editing of text, Vim is the clear winner. Whether that's all you want, is another question.
by abelardx 13y ago
For the pure editing of text, Vim is the clear winner. Whether that's all you want, is another question.
- swah 13y agoIf 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..)
- z92 13y ago: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.
- swah 13y agoHow could anyone use :bn and :bp? Its 4 keypresses!! :) Contrast with ctrl-tab.
- wting 13y agoI'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.
- micampe 13y agoThe only vim plugin I use: http://www.vim.org/scripts/script.php?script_id=1664 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>
- johncoltrane 13y agoWhat do you call "accidental quitting"?
- swah 13y agoIf 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...
- stray 13y agoYou misspelled "emacs".
- abelardx 13y agoI 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.