I am just getting into rails.vim as my ROR IDE and I am really liking it. The only thing I don't know how to do, that I wish I could, is hop back to the last file I was editing.
For example, if I am editing one file, say a view and I use :Rcontroller
to hop over the the corresponding controller, is there a way to quickly go back to the model (without :Rmodel
)? I'm looking for some functionality like that of CTRL-TAB
in visual studio.
This isn't actually related to Rails.vim plugin. Add the following line to your .vimrc
file
map <Leader>p <C-^> " Go to previous file
Assuming <Leader>
is mapped to ,
then you can just press ,p
to go to the previous file.
This is how I've mapped my leader:
let mapleader = ","
To go back just hit ctrl+o in command mode, ctrl+i to go forward in opened file history.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With