-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cvimrc
125 lines (86 loc) · 3.71 KB
/
.cvimrc
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
" # https://github.com/1995eaton/chromium-vim#cvimrc
let barposition = "bottom"
let hintcharacters = "jklhmuioyn"
set smoothscroll
let scrollduration = 200
let scrollstep = 120
" # Search Engines
" If you leave out the '%s' at the end of the URL, your query will be
" appended to the link. Otherwise, your query will replace the '%s'.
let searchalias i = "google-image"
let searchalias img = "google-image"
let searchengine gmail = "https://mail.google.com/mail/u/0/#search/%s"
let searchalias mail = "gmail"
let searchengine googledrive = "https://drive.google.com/drive/search/?q=%s"
let searchalias f = "googledrive"
let searchalias drive = "googledrive"
let searchengine googlemaps = "https://www.google.com/maps/search/%s"
let searchalias map = "googlemaps"
let searchengine googlephotos = "https://photos.google.com/search/%s"
let searchalias p = "googlephotos"
let searchalias photos = "googlephotos"
let searchengine googleshopping = "https://www.google.com/search?q=%s&tbm=shop"
let searchalias shop = "googleshopping"
let searchengine googlevideos = "https://www.google.com/search?q=%s&tbm=vid"
let searchalias vid = "googlevideos"
let searchalias v = "googlevideos"
let searchengine googlekeep = "https://keep.google.com/?pli=1#search/text%253d%s"
let searchalias k = "googlekeep"
let searchalias keep = "googlekeep"
let searchengine googlecalendar = "https://calendar.google.com/calendar/r/search?q=%s"
let searchalias cal = "googlecalendar"
let searchalias a = "amazon"
let searchalias w = "wikipedia"
let searchengine wordpress = "https://developer.wordpress.org/?s=%s"
let searchalias wp = "wordpress"
let searchengine hookr = "http://hookr.io/all/#index=a&search=%s"
let searchalias hook = "hookr"
let searchengine stackexchange = "https://stackexchange.com/search?q=%s"
let searchalias se = "stackexchange"
let searchengine caniuse = "https://caniuse.com/#search=%s"
let searchalias can = "caniuse"
let searchengine devhints = "https://devhints.io/%s"
let searchalias hint = "devhints"
let searchengine stackoverflow = "https://stackoverflow.com/search?q=%s"
let searchalias so = "stackoverflow"
let searchalias gh = "github"
let searchalias y = "youtube"
" # Show only these engines in the command bar
let completionengines = ["google", "wikipedia", "youtube", "amazon", "github", "google-image"]
" # Marks
" Open all of these in a tab with `gnb` or open one of these with <N>goa where <N>
" TODO: add bookmark folders, or can do this already?
" let qmark a = ["http://www.reddit.com", "http://www.google.com", "http://twitter.com"]
" # Mappings
let mapleader = "<Space>"
map <Leader>r :reloadTabUncached
map <Leader>x :restore<Space>
" Bookmarks
map <Leader>bc :bookmarks /Bookmarks Bar/electro/main<CR>
map <Leader>bb :bookmarks /Bookmarks Bar/
" # Site-specific configs
" blacklists prefixed by '@' act as a whitelist
let blacklists = ["*://*shortcutfoo.com*", "*://mail.google.com*", "*://live.browserstack.com*", "https://mixpanel.com/*", "https://labc01.macincloud.com/*"]
" site '*://domain.com*' {}
" # Functions
" Display public IP address in the status bar
getIP() -> {{
httpRequest({url: 'http://api.ipify.org/?format=json', json: true},
function(res) { Status.setMessage('IP: ' + res.ip); });
}}
map ci :call getIP<CR>
" Update settings via a local file (and the `:source` command) rather than the
" default options page in chrome
" As long as localconfig is set in the .cvimrc file. cVim will continue to read
" settings from there
" let configpath = '~/.cvimrc'
let configpath = '/home/sean/.cvimrc'
set localconfig
" # TODO:
"" use :execute. For example, "map j :execute 2j"
"" use :script to run JavaScript on the current page
"" use on site load
"" site '*://*/*.js' {
"" call :pintab
"" call scrollDown
""}