6 ms·
Quote: they might end up spending a lot of fruitless time trying to force Vim to follow the same model through its configuration. Here's a fun little snippet f
by davvid 14y ago
Quote: they might end up spending a lot of fruitless time trying to force Vim to follow the same model through its configuration.
Here's a fun little snippet from my .vimrc. Enjoy ;-)
" tab navigation like firefox
nmap <c-s-tab> :tabprevious<cr>
nmap <c-tab> :tabnext<cr>
map <c-s-tab> :tabprevious<cr>
map <c-tab> :tabnext<cr>
imap <c-s-tab> <esc>:tabprevious<cr>i
imap <c-tab> <esc>:tabnext<cr>i
nmap <c-t> :tabnew<cr>:e<space>
imap <c-t> <esc>:tabnew<cr>:e<space>
- tyrmored 14y agoAuthor here. That's not quite what I meant; mapping keystrokes to Vim's tab commands is well and good, but it requires some serious kludges to make Vim behave the same way as, say, Notepad++, where one open tab equals one open file, and that's that. "Window groups" would have been a far more accurate though potentially less familiar name for the feature, in my opinion. I don't actually use tabs much, personally. I seldom have more than three or four files open at a time.
- truncate 14y agoThis not a configuration I would recommend as - 1. The mappings with TAB wont work in terminal. 2. <C-t> mapping is default map for ctags jump back. And if you are going to be a long term Vim user, better configure Firefox like Vim than Vim like Firefox. I use Pentadectyle extension to get Vim like bindings in FF and I love it. For switching tabs I use <c-n> and <c-p> for next/previous in command mode. Under insert mode, its default map for autocompletion which again I don't prefer remapping. Since I don't prefer to switch tabs in insert mode, that's ok.
- SkyMarshal 14y agoSecond Pentadactyl. There's also Vimium and Vrome for Chrome/ium. There are Vim plugins for everything these days (even Eclipse and Emacs), so that combined with a launcher like Synapse or Gnome-Do, you almost never have to use your mouse anymore.
- tyrmored 14y agoUsing Chrome and Vimium on sites like Reddit and Hacker News almost feels like cheating -- "I shouldn't be able to consume this amount of information without even having to move my wrists."
- danneu 14y agoTry Pentadactyl on FF. Made me switch from Chrome to FF for regular browsing. Unfortunately Chrome's limited api makes it impossible to port Penta's robustness to Chrome.
- truncate 14y agoYes. I tried some Vim plugin for Chrome. It sucked. Pentadectyle is very robust and full-featured. Difference is considerable as compared to its Chrome counterpart. Completely transforms your FF experience.
- tyrmored 14y agoThe only thing I dislike about Vimium is it doesn't work on the "New Tab" window.
- deleted 14y ago[deleted]