Thursday, October 8, 2015

Switching buffers on write...

Hey Guys,

I suspect this question has been asked and answered before but I haven't found any relevant answers.

I would like to map the command:

:w new_filename

to do the following two things

:w new_filename
:e new_filename

I thought I would implement this with an autocmd on the BufFilePost event. My challenge is how to access the new_file_name value. I checked the help docs on registers but didn't see anything relevant there....

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment