This repository has been archived by the owner on Mar 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
browser-refresh.txt
72 lines (57 loc) · 3.42 KB
/
browser-refresh.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
*browser-refresh.txt*
Author:
Matthew Kitt <mk dot kitt at gmail dot com>
This plugin is licensed under the terms of the MIT License. Please see
browser-refresh.vim for the license in its entirety.
==============================================================================
Browser Refresh *browser-refresh*
1. Introduction |browser-refresh-intro|
2. Dependencies |browser-refresh-dependencies|
3. Usage |browser-refresh-usage|
4. Options |browser-refresh-options|
Default Browser |browser-refresh-defaultbrowser|
Return Focus |browser-refresh-returnfocus|
5. Recommendation |browser-refresh-recommendation|
==============================================================================
1. Introduction *browser-refresh-intro*
Browser Refresh is based off of the TextMate snippet "refresh current running
browser". In other words it allows you to call a command and reload the front
window of your current browser. It also contains the option to auto
return focus to vim after the browser has done it's thing.
In it's current implementation, it only been tested within MacVim. It works
from within Terminal Vim, but there are a few issues with screen redrawing.
Stay tuned for updates to other vim implementations.
==============================================================================
2. Dependencies *browser-refresh-dependencies*
Browser Refresh requires the following:
- Vim version 7.0 or above
- MacVim is recommended
- Google Chrome, Safari or Firefox (Mac)
==============================================================================
3. Usage *browser-refresh-usage*
Send vim the command :RRB (Refresh Running Browser) and it will reload the
curruent front window of the running browser. If set, after the reload in the
browser window has fired, it will return focus back to vim.
==============================================================================
4. Options *browser-refresh-options*
Browser Refresh comes configured with a few global variables which can be
overridden within you .vimrc file.
g:RefreshRunningBrowserDefault *browser-refresh-defaultbrowser*
Generally you set this to your default browser within the OS to speed
up the conditional logic. By default it is set to "all" The following
variables are currently supported:
let g:RefreshRunningBrowserDefault = 'all' <= default
let g:RefreshRunningBrowserDefault = 'chrome'
let g:RefreshRunningBrowserDefault = 'safari'
let g:RefreshRunningBrowserDefault = 'firefox'
g:RefreshRunningBrowserReturnFocus *browser-refresh-returnfocus*
Enables or disables the OS to return focus to vim after the browser has
finished reloading the current page. By default it is set to "1" (true).
To change this so the browser maintains focus, set in your .vimrc file:
let g:RefreshRunningBrowserReturnFocus = 0
==============================================================================
5. Recommendation *browser-refresh-recommendation*
Probably a good idea to map this to a leader key.
map <silent><leader>r :RRB<CR>
==============================================================================
vim:tw=78:ts=8:ft=help:norl: