How to get back to the previous tab I was working on, after closing the latest

6

0

My tabs:

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Scenario

If you're a Firefox user you know that

if you have 10 tabs open and say you're in the tab #5. If you open a new tab which will become #11 in order and search something, after you finish and close this #11 tab Firefox will direct you the the last active tab you were in which is #5.

Using Vimperator

You won't get the similar effect. In the same scenario, while you're in tab #5 you can go t and search for something which will lead to opening a tab at #11. Now you press d and where you are now ? #10

and you need to ctrl+p all the way back to #5.

So in this case I am looking for one of these solutions.

  1. to be able to open a tab straight after the current tab (which closing it will capital D will put me back to my active tab)
  2. a way to close a tab and being brought back to the last active tab that I worked on.

Will appreciate it if somebody got a solution for this.

thanks

Mehrad

Posted 2014-03-27T00:36:08.347

Reputation: 508

Answers

2

I'm pretty sure you know the solution (point 2): use the default firefox shorcut, i.ed use Ctrl+w and don't use d !

Ehvince

Posted 2014-03-27T00:36:08.347

Reputation: 256

1Tobe frank, I thought this shortcut is overwritten by Vimperator. This means I can allocate Ctrl+w to the d key and happy days... I appreciate you answer man. – Mehrad – 2014-03-27T22:48:11.677

3

I'm new to vimperator and i was looking into this question. The better way to do it is to use :q. This way you can go back to the previously active tab without missing vim's experience

Vinod

Posted 2014-03-27T00:36:08.347

Reputation: 31

This is actually exactly right. Thanks for your reply and letting us know pal. – Mehrad – 2014-08-21T00:07:41.327

1

Remap d to C-w by adding

map d <C-w>

to your ~/.vimperatorrc.

ntc2

Posted 2014-03-27T00:36:08.347

Reputation: 131

That's exactly what I ended up doing. Cheers :) – Mehrad – 2015-07-01T22:37:28.573