Tuesday, March 15, 2016

How to write a map command to close the firefox and return return to the previous position?

Vim is in normal mode,cursor is located on character m.

[1]: http://i.stack.imgur.com/oesOZ.jpg

I press F12 to call firefox to open my test.html file.
(nnoremap <F12> :exe '!"firefox.exe" %:p' <CR> in my _vimrc file)
There is a typo in html file ,i want to fix it.


[2]: http://i.stack.imgur.com/DLWGV.jpg
Here is my operation process.
1.press tick key to close the firefox
An prompt will pop up.

[3]: http://i.stack.imgur.com/mp9Bw.jpg

2.press esc key.
Now the cursor return to the previous position.
How to write another map command ,to just press one key to complete the work ? To simplify two step into one hotkey?


--
--
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: